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];