Generated methods used to be inserted one higher than the intended place

This commit is contained in:
grootjans committed 2012-07-02 21:49:41 +02:00
1 parent c0e326bfcb
commit 1c0dc22386
1 file changed
+1 -1
@@ -1228,7 +1228,7 @@ public class EclipseHandlerUtil {
}
AbstractMethodDeclaration[] newArray = new AbstractMethodDeclaration[parent.methods.length + 1];
System.arraycopy(parent.methods, 0, newArray, 0, insertionPoint);
if (insertionPoint <= parent.methods.length) {
if (insertionPoint < parent.methods.length) {
System.arraycopy(parent.methods, insertionPoint, newArray, insertionPoint + 1, parent.methods.length - insertionPoint);
}