mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
Refactoring: ArrayList -> List and parameters annotations
GitOrigin-RevId: edb20461f7735a0c9e96574801bbeb60480686d3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b07eabd319
commit
1558ebcc44
@@ -6,15 +6,16 @@ import com.intellij.codeInsight.dataflow.map.MapSemilattice;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.jetbrains.python.codeInsight.dataflow.scope.ScopeVariable;
|
||||
import com.jetbrains.python.codeInsight.dataflow.scope.impl.ScopeVariableImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class PyReachingDefsSemilattice implements MapSemilattice<ScopeVariable> {
|
||||
@Override
|
||||
public boolean eq(DFAMap<ScopeVariable> e1, DFAMap<ScopeVariable> e2) {
|
||||
public boolean eq(@NotNull DFAMap<ScopeVariable> e1, @NotNull DFAMap<ScopeVariable> e2) {
|
||||
if (e1 == PyReachingDefsDfaInstance.INITIAL_MAP && e2 != PyReachingDefsDfaInstance.INITIAL_MAP ||
|
||||
e2 == PyReachingDefsDfaInstance.INITIAL_MAP && e1 != PyReachingDefsDfaInstance.INITIAL_MAP) {
|
||||
return false;
|
||||
@@ -23,7 +24,7 @@ public class PyReachingDefsSemilattice implements MapSemilattice<ScopeVariable>
|
||||
}
|
||||
|
||||
@Override
|
||||
public DFAMap<ScopeVariable> join(ArrayList<DFAMap<ScopeVariable>> ins) {
|
||||
public DFAMap<ScopeVariable> join(@NotNull List<DFAMap<ScopeVariable>> ins) {
|
||||
if (ins.isEmpty()) {
|
||||
return DFAMap.empty();
|
||||
}
|
||||
@@ -58,7 +59,7 @@ public class PyReachingDefsSemilattice implements MapSemilattice<ScopeVariable>
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static Set<String> getResultNames(final ArrayList<DFAMap<ScopeVariable>> ins) {
|
||||
private static Set<String> getResultNames(final List<DFAMap<ScopeVariable>> ins) {
|
||||
// Compute intersection of all the names
|
||||
Set<String> names2Include = null;
|
||||
for (DFAMap<ScopeVariable> map : ins) {
|
||||
|
||||
Reference in New Issue
Block a user