mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-184554 IncorrectOperationException from WrapWithAdapterMethodCallFix
Reproducible only if 'Good code is red' inspection from DevKit is switched on
This commit is contained in:
+2
@@ -68,6 +68,8 @@ public class WrapWithAdapterMethodCallFix extends LocalQuickFixAndIntentionActio
|
||||
if (LambdaUtil.notInferredType(variableType)) return false;
|
||||
|
||||
String typeText = variableType.getCanonicalText();
|
||||
// Empty text can be generated by PsiImmediateClassType if unresolved anonymous class is created like new X() {}
|
||||
if (typeText.isEmpty()) return false;
|
||||
PsiExpression replacement;
|
||||
try {
|
||||
replacement = createReplacement(context, "((" + typeText + ")null)");
|
||||
|
||||
Reference in New Issue
Block a user