-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayIndexOutOfBoundsException using content assist #808
Comments
Can you share the expression you are trying to complete when this exception occurs? I am not seeing it on the |
What library is |
The source code for this class is not public and the jar is not published on a public mvn repo either. Only alternative would be to download it from our update site and extract it from the plugin jar packing it (after extraction it's in |
It looks like My intuition is that the lack of sources is the result of the issue. I'm setting up a small project with only the toro library to test that out. |
The <?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="lib" path="/Applications/TORO Coder Studio.app/Contents/Eclipse/plugins/io.toro.coder.core_1.5.0.201902080847/lib/toro-integrate-core-api-3.2.0-jar-with-dependencies.jar">
<attributes>
<attribute name="javadoc_location" value="https://javadocs.torocloud.com/integrate/3.2.0"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path=".bin"/>
</classpath> |
Thanks for that info. Could you try two separate things for me?
|
If I remove the javadoc link the error is not showing anymore. |
Okay, here's what is going on. This section of BinaryMethod.getParameterNames() is trying to parse the param names out of the retrieved javadoc string (included below).
if (methodDoc != null) {
int indexOfOpenParen = methodDoc.indexOf('(');
// Annotations may have parameters, so make sure we are parsing the actual method parameters.
if (info.getAnnotations() != null) {
while (indexOfOpenParen != -1 && !isOpenParenForMethod(methodDoc, getElementName(), indexOfOpenParen)) {
indexOfOpenParen = methodDoc.indexOf('(', indexOfOpenParen + 1);
}
}
if (indexOfOpenParen != -1) {
final int indexOfClosingParen = methodDoc.indexOf(')', indexOfOpenParen);
if (indexOfClosingParen != -1) {
final char[] paramsSource =
CharOperation.replace(
methodDoc.substring(indexOfOpenParen + 1, indexOfClosingParen).toCharArray(),
" ".toCharArray(), //$NON-NLS-1$
new char[] {' '});
final char[][] params = splitParameters(paramsSource, paramCount);
final int paramsLength = params.length;
String[] names = new String[paramsLength];
for (int i = 0; i < paramsLength; i++) {
final char[] param = params[i];
int indexOfSpace = CharOperation.lastIndexOf(' ', param);
if (indexOfSpace != -1) {
names[i] = String.valueOf(param, indexOfSpace + 1, param.length - indexOfSpace -1);
} else {
names[i] = "arg" + i; //$NON-NLS-1$
}
}
return this.parameterNames = names;
}
}
} |
Ready to test |
How do I test? Is it in one of the snapshot builds or release builds? |
Usually the Check for Updates menu command finds and installs the new version. |
Yes just saw that it built on Bamboo. |
Depending on the version of eclipse platform you have, you can get the latest build from one of these update sites:
|
Sorry for the late reply, other stuff came up. I was able to test it, so the expression |
Ready to re-test |
It's fixed, no more error :) |
Hi,
I'm getting an ArrayIndexOutOfBoundsException when using content assist in the Groovy editor. It seems to only happen on objects which have a certain extension method. The exception occurs only right after I press
.
but not if I trigger content assist manually after typing the first letters.I'm using Eclipse 4.10.
The text was updated successfully, but these errors were encountered: