mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-highlighting] IDEA-374968 Red code in ConcurrentSkipListMap.java
GitOrigin-RevId: cfb9b5cbf965190668e9cb4cb9ed102f26fcd3f7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a2b962df79
commit
1a68af9b51
@@ -67,13 +67,14 @@ public final class JavaPsiMethodUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aClass a class to analyze
|
||||
* @param aClass a class to analyze
|
||||
* @param overrideEquivalentSuperMethods collection of override-equivalent super methods
|
||||
* @param skipSelf whether to ignore methods defined directly in aClass
|
||||
* @return an abstract method from the supplied collection that must be implemented, because an override-equivalent
|
||||
* default method is present, and the ambiguity must be resolved.
|
||||
*/
|
||||
public static @Nullable PsiMethod getAbstractMethodToImplementWhenDefaultPresent(
|
||||
@NotNull PsiClass aClass, @NotNull Collection<? extends PsiMethod> overrideEquivalentSuperMethods) {
|
||||
@NotNull PsiClass aClass, @NotNull Collection<? extends PsiMethod> overrideEquivalentSuperMethods, boolean skipSelf) {
|
||||
if (aClass.hasModifierProperty(PsiModifier.ABSTRACT) || aClass instanceof PsiTypeParameter) return null;
|
||||
if (overrideEquivalentSuperMethods.size() <= 1) return null;
|
||||
PsiMethod abstractMethod = null;
|
||||
@@ -90,6 +91,7 @@ public final class JavaPsiMethodUtil {
|
||||
}
|
||||
}
|
||||
if (abstractMethod == null || defaultMethod == null) return null;
|
||||
if (!skipSelf && MethodSignatureUtil.findMethodBySuperMethod(aClass, defaultMethod, false) != null) return null;
|
||||
PsiClass abstractMethodContainingClass = abstractMethod.getContainingClass();
|
||||
if (abstractMethodContainingClass == null || !abstractMethodContainingClass.isInterface()) return null;
|
||||
PsiClass defaultMethodContainingClass = defaultMethod.getContainingClass();
|
||||
|
||||
Reference in New Issue
Block a user