From 3422f0b39cc43a0d0becd64e8c2cd1c86a8ed9d9 Mon Sep 17 00:00:00 2001 From: anna Date: Tue, 27 Nov 2012 17:40:40 +0100 Subject: [PATCH] AIOOBE (cherry picked from commit a7dd44bbbd2f36928f5b414e0a14050c4fcdb5c6) --- .../codeInsight/daemon/impl/quickfix/StaticImportMethodFix.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/StaticImportMethodFix.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/StaticImportMethodFix.java index 3d60f138df53..9d22dbbcd7ff 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/StaticImportMethodFix.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/StaticImportMethodFix.java @@ -128,7 +128,7 @@ public class StaticImportMethodFix implements IntentionAction { final PsiMethod psiMethod = (PsiMethod)psiElement; final PsiParameter[] parameters = psiMethod.getParameterList().getParameters(); final int idx = ArrayUtilRt.find(((PsiExpressionList)parent).getExpressions(), PsiResolveHelperImpl.skipParenthesizedExprUp(methodCall)); - if (idx > -1) { + if (idx > -1 && parameters.length > 0) { PsiType parameterType = parameters[Math.min(idx, parameters.length - 1)].getType(); if (idx >= parameters.length - 1) { final PsiParameter lastParameter = parameters[parameters.length - 1];