mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] IDEA-381146 IJ-CR-181967 RecordAugmentProvider throws INRE when in Dumb Mode
- reformat GitOrigin-RevId: f165ea69c3232ec9cbcc0294b906a3c07fc69983
This commit is contained in:
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) {
|
||||
|
||||
Reference in New Issue
Block a user