[java] IDEA-381146 IJ-CR-181967 RecordAugmentProvider throws INRE when in Dumb Mode

- reformat

GitOrigin-RevId: f165ea69c3232ec9cbcc0294b906a3c07fc69983
This commit is contained in:
Mikhail Pyltsin
2025-11-12 10:35:53 +00:00
committed by intellij-monorepo-bot
parent 9e24091d2c
commit 5bdae44492
@@ -80,7 +80,8 @@ public final class RecordAugmentProvider extends PsiAugmentProvider implements D
PsiMethod nonPhysical;
try {
nonPhysical = factory.createMethodFromText(sb, recordHeader.getContainingClass());
} catch (IncorrectOperationException e) {
}
catch (IncorrectOperationException e) {
return null;
}
PsiModifierList classModifierList = aClass.getModifierList();
@@ -104,12 +105,11 @@ public final class RecordAugmentProvider extends PsiAugmentProvider implements D
else {
//it is necessary to check with alternative resolver
//because it is necessary to find its super class (in dumb mode)
dumbService.runWithAlternativeResolveEnabled(()->{
dumbService.runWithAlternativeResolveEnabled(() -> {
hasConstructor.set(hasConstructorFinder.get());
});
}
if(hasConstructor.get()) return true;
return false;
return hasConstructor.get();
}
private static boolean shouldGenerateMethod(PsiRecordComponent component, List<PsiMethod> ownMethods) {