OptionalIsPresentFix: remove problem type check to avoid DFA in write action

Fixes EA-220101 - F: PsiScopesUtil.setupAndRunProcessor

GitOrigin-RevId: 333593d5db77038a65642f62841f34a7ef40d35d
This commit is contained in:
Tagir Valeev
2019-12-24 08:41:04 +00:00
committed by intellij-monorepo-bot
parent 40c529350a
commit 774de2a61b
@@ -287,7 +287,6 @@ public class OptionalIsPresentInspection extends AbstractBaseJavaLocalInspection
else {
return;
}
if (myScenario.getProblemType(optionalRef, thenElement, elseElement) == ProblemType.NONE) return;
PsiElementFactory factory = JavaPsiFacade.getElementFactory(project);
CommentTracker ct = new CommentTracker();
String replacementText = myScenario.generateReplacement(factory, ct, optionalRef, thenElement, elseElement);