mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix ArrayIndexOutOfBoundsException in TestDataFilesReferencesContributor
This commit is contained in:
@@ -105,6 +105,9 @@ public class TestDataFilesReferencesContributor extends PsiReferenceContributor
|
||||
}
|
||||
|
||||
PsiParameter[] parameters = callMethod.getParameterList().getParameters();
|
||||
if (parameters.length == 0) {
|
||||
return null;
|
||||
}
|
||||
// index may be greater than parameters length in case of varargs
|
||||
return index >= parameters.length ? parameters[parameters.length - 1] : parameters[index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user