mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-intentions] EA-741594 - AIOOBE: RemoveRedundantArgumentsFix$ForImplicitConstructorAction.invoke
GitOrigin-RevId: e57bc39d9f506897ac92dd059f5d9d906b77ba1e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ef30944ea2
commit
ba49de7b03
+2
-1
@@ -162,12 +162,13 @@ public final class RemoveRedundantArgumentsFix implements IntentionAction {
|
||||
|
||||
@Override
|
||||
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
|
||||
return true;
|
||||
return myList.isValid() && !myList.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
|
||||
PsiExpression[] expressions = myList.getExpressions();
|
||||
if (expressions.length == 0) return;
|
||||
myList.deleteChildRange(expressions[0], expressions[expressions.length - 1]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user