diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/control/finalVar/InvalidWriteAccessSearcher.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/control/finalVar/InvalidWriteAccessSearcher.java index 4117146a060e..b43981bf2b07 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/control/finalVar/InvalidWriteAccessSearcher.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/control/finalVar/InvalidWriteAccessSearcher.java @@ -5,9 +5,9 @@ import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrVariable; -import org.jetbrains.plugins.groovy.lang.psi.controlFlow.VariableDescriptor; import org.jetbrains.plugins.groovy.lang.psi.controlFlow.Instruction; import org.jetbrains.plugins.groovy.lang.psi.controlFlow.ReadWriteVariableInstruction; +import org.jetbrains.plugins.groovy.lang.psi.controlFlow.VariableDescriptor; import org.jetbrains.plugins.groovy.lang.psi.controlFlow.impl.VariableDescriptorFactory; import org.jetbrains.plugins.groovy.lang.psi.dataFlow.DFAEngine; import org.jetbrains.plugins.groovy.lang.psi.dataFlow.DfaInstance; @@ -84,11 +84,6 @@ public class InvalidWriteAccessSearcher { public MyData join(@NotNull List ins) { return new MyData(ins); } - - @Override - public boolean eq(@NotNull MyData e1, @NotNull MyData e2) { - return e1.equals(e2); - } } private static class MyData { diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/dataflow/WritesCounterSemilattice.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/dataflow/WritesCounterSemilattice.java index ac8abc999bf0..f08c1c7cf985 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/dataflow/WritesCounterSemilattice.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/dataflow/WritesCounterSemilattice.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 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-2019 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 org.jetbrains.plugins.groovy.codeInspection.dataflow; import gnu.trove.TObjectIntHashMap; @@ -46,9 +32,4 @@ public class WritesCounterSemilattice implements Semilattice e1, @NotNull TObjectIntHashMap e2) { - return e1.equals(e2); - } } diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/utils/ControlFlowUtils.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/utils/ControlFlowUtils.java index a1b45045915f..237eaf467ba1 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/utils/ControlFlowUtils.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/utils/ControlFlowUtils.java @@ -780,11 +780,6 @@ public class ControlFlowUtils { } return result; } - - @Override - public boolean eq(@NotNull BitSet e1, @NotNull BitSet e2) { - return e1.equals(e2); - } }; DfaInstance dfa = new DfaInstance() { diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/dataFlow/Semilattice.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/dataFlow/Semilattice.java index 0ea1fd447500..0b67921359a6 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/dataFlow/Semilattice.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/dataFlow/Semilattice.java @@ -1,31 +1,16 @@ -/* - * Copyright 2000-2017 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-2019 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 org.jetbrains.plugins.groovy.lang.psi.dataFlow; import org.jetbrains.annotations.NotNull; import java.util.List; -/** - * @author ven - */ public interface Semilattice { @NotNull E join(@NotNull List ins); - boolean eq(@NotNull E e1, @NotNull E e2); + default boolean eq(@NotNull E e1, @NotNull E e2) { + return e1.equals(e2); + } }