[java] Fix false positive for local classes with super call in constructor

#IDEA-350324 Fixed

GitOrigin-RevId: 32f487b6ec841c26dbb73ec8931a9f0f6863a3d9
This commit is contained in:
Bart van Helvert
2024-03-29 11:56:41 +01:00
committed by intellij-monorepo-bot
parent d82fc55b38
commit 96690d8ae4
2 changed files with 17 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ public final class JavaPsiConstructorUtil {
if (body == null) return new CachedValueProvider.Result<>(null, PsiModificationTracker.MODIFICATION_COUNT);
Ref<PsiMethodCallExpression> result = new Ref<>();
PsiTreeUtil.processElements(body, PsiMethodCallExpression.class, call -> {
if (isConstructorCall(call)) {
if (isConstructorCall(call) && PsiTreeUtil.getParentOfType(call, PsiMethod.class) == constructor) {
result.set(call);
return false;
}