typeDecl.methods = new AbstractMethodDeclaration[] { methodDecl };
} else {
AbstractMethodDeclaration[] newMethods;
- System.arraycopy(typeDecl.methods, 0, newMethods = new AbstractMethodDeclaration[typeDecl.methods.length + 1], 1,
+ System.arraycopy(typeDecl.methods, 0,
+ newMethods = new AbstractMethodDeclaration[typeDecl.methods.length + 1], 0,
typeDecl.methods.length);
- newMethods[0] = methodDecl;
+ newMethods[typeDecl.methods.length] = methodDecl;
typeDecl.methods = newMethods;
}
if ((typeDecl.modifiers & AccAbstract) == AccAbstract) {