From da9be47b4ce2c7a2bfe6f8dd098d52e2e348ff30 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Wed, 25 Apr 2018 11:04:52 +0200 Subject: [PATCH] do not write default TEST_SEARCH_SCOPE --- .../testframework/TestSearchScope.java | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/platform/testRunner/src/com/intellij/execution/testframework/TestSearchScope.java b/platform/testRunner/src/com/intellij/execution/testframework/TestSearchScope.java index 52ca4f46cc76..f5f01a4b2c56 100644 --- a/platform/testRunner/src/com/intellij/execution/testframework/TestSearchScope.java +++ b/platform/testRunner/src/com/intellij/execution/testframework/TestSearchScope.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2009 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.execution.testframework; import com.intellij.execution.configurations.ModuleBasedConfiguration; @@ -23,6 +9,8 @@ import org.jdom.Element; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.Nullable; +import java.util.Objects; + /** * @author dyoma */ @@ -63,8 +51,6 @@ public interface TestSearchScope { } }; - - class Wrapper implements JDOMExternalizable { @NonNls private static final String DEFAULT_NAME = "defaultName"; private TestSearchScope myScope = SINGLE_MODULE; @@ -98,5 +84,18 @@ public interface TestSearchScope { public String toString() { return myScope == null? "null" : myScope.toString(); } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Wrapper)) return false; + Wrapper wrapper = (Wrapper)o; + return Objects.equals(myScope, wrapper.myScope); + } + + @Override + public int hashCode() { + return Objects.hash(myScope); + } } }