### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java,v retrieving revision 1.132 diff -u -r1.132 SourceTypeBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 10 Apr 2006 18:55:29 -0000 1.132 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 20 Apr 2006 15:46:30 -0000 @@ -72,10 +72,11 @@ abstractMethod.thrownExceptions, this); - MethodBinding[] temp = new MethodBinding[this.methods.length + 1]; - System.arraycopy(this.methods, 0, temp, 0, this.methods.length); - temp[this.methods.length] = defaultAbstract; - this.methods = temp; + final int length = this.methods.length; + System.arraycopy(this.methods, 0, this.methods = new MethodBinding[length + 1], 0, length); + this.methods[length] = defaultAbstract; + ReferenceBinding.sortMethods(this.methods, 0, length); + this.tagBits |= TagBits.AreMethodsSorted; } public void addDefaultAbstractMethods() { if ((this.tagBits & TagBits.KnowsDefaultAbstractMethods) != 0) return; @@ -88,7 +89,6 @@ ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][]; int lastPosition = 0; interfacesToVisit[lastPosition] = superInterfaces(); - boolean hasAddedMethods = false; for (int i = 0; i <= lastPosition; i++) { ReferenceBinding[] interfaces = interfacesToVisit[i]; for (int j = 0, length = interfaces.length; j < length; j++) { @@ -99,7 +99,6 @@ MethodBinding method = superMethods[m]; if (!implementsMethod(method)) { addDefaultAbstractMethod(method); - hasAddedMethods = true; } } @@ -112,13 +111,6 @@ } } } - if (hasAddedMethods) { - // re-sort methods - int length = this.methods.length; - if (length > 1) { - ReferenceBinding.sortMethods(this.methods, 0, length - 1); - } - } } } /* Add a new synthetic field for .