mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove duplicates from suggested imports (IDEA-53735)
This commit is contained in:
+7
@@ -154,6 +154,13 @@ public abstract class ImportClassFixBase<T extends PsiElement, R extends PsiRefe
|
||||
}
|
||||
|
||||
filerByPackageName(classList, file);
|
||||
|
||||
return removeDuplicates(classList);
|
||||
}
|
||||
|
||||
private static List<PsiClass> removeDuplicates(List<PsiClass> classList) {
|
||||
Set<String> uniqueNames = new HashSet<>();
|
||||
classList.removeIf(aClass -> !uniqueNames.add(aClass.getQualifiedName()));
|
||||
return classList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user