Community
Participate
Working Groups
20020318 here's JavaModel.delete's code (beginning): if (elements != null && elements[0] != null && elements[0].getElementType() < IJavaElement.TYPE) this throws ArrayIndexOutOfBoundsException if array is empty javadoc allows empty arrays same problem for: - copy - move - rename
not really major - workaround it trivial
In fact there is two problems. All underneath operations throws a JavaModelException is there is no element to process. So this should be done as well for the JavaModel operations. I will update the doc to add one more cases for an exception to be thrown running such operations and I will fix the code to prevent the ArrayIndexOutOfBoundsException. Fixed and released in 2.1 stream.
Verified.
Added API compatibility note to 2.1 release notes.