mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix AIOOBE
This commit is contained in:
+13
-12
@@ -261,18 +261,19 @@ public class GroovyParameterInfoHandler implements ParameterInfoHandlerWithTabAc
|
||||
}
|
||||
|
||||
assert argTypes != null;
|
||||
|
||||
if (parameterTypes.length <= currIndex) {
|
||||
context.setUIComponentEnabled(i, false);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
for (int j = 0; j < currIndex; j++) {
|
||||
PsiType argType = argTypes[j];
|
||||
final PsiType paramType = substitutor != null ? substitutor.substitute(parameterTypes[j]) : parameterTypes[j];
|
||||
if (!TypesUtil.isAssignable(paramType, argType, place)) {
|
||||
context.setUIComponentEnabled(i, false);
|
||||
break Outer;
|
||||
if (argTypes.length > currIndex) {
|
||||
if (parameterTypes.length <= currIndex) {
|
||||
context.setUIComponentEnabled(i, false);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
for (int j = 0; j < currIndex; j++) {
|
||||
PsiType argType = argTypes[j];
|
||||
final PsiType paramType = substitutor != null ? substitutor.substitute(parameterTypes[j]) : parameterTypes[j];
|
||||
if (!TypesUtil.isAssignable(paramType, argType, place)) {
|
||||
context.setUIComponentEnabled(i, false);
|
||||
break Outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user