View | Details | Raw Unified | Return to bug 137744 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java (-9 / +2 lines)
Lines 76-81 Link Here
76
	System.arraycopy(this.methods, 0, temp, 0, this.methods.length);
76
	System.arraycopy(this.methods, 0, temp, 0, this.methods.length);
77
	temp[this.methods.length] = defaultAbstract;
77
	temp[this.methods.length] = defaultAbstract;
78
	this.methods = temp;
78
	this.methods = temp;
79
	ReferenceBinding.sortMethods(this.methods, 0, this.methods.length - 1);
80
	this.tagBits |= TagBits.AreMethodsSorted;
79
}
81
}
80
public void addDefaultAbstractMethods() {
82
public void addDefaultAbstractMethods() {
81
	if ((this.tagBits & TagBits.KnowsDefaultAbstractMethods) != 0) return;
83
	if ((this.tagBits & TagBits.KnowsDefaultAbstractMethods) != 0) return;
Lines 88-94 Link Here
88
		ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][];
90
		ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][];
89
		int lastPosition = 0;
91
		int lastPosition = 0;
90
		interfacesToVisit[lastPosition] = superInterfaces();
92
		interfacesToVisit[lastPosition] = superInterfaces();
91
		boolean hasAddedMethods = false;
92
		for (int i = 0; i <= lastPosition; i++) {
93
		for (int i = 0; i <= lastPosition; i++) {
93
			ReferenceBinding[] interfaces = interfacesToVisit[i];
94
			ReferenceBinding[] interfaces = interfacesToVisit[i];
94
			for (int j = 0, length = interfaces.length; j < length; j++) {
95
			for (int j = 0, length = interfaces.length; j < length; j++) {
Lines 99-105 Link Here
99
						MethodBinding method = superMethods[m];
100
						MethodBinding method = superMethods[m];
100
						if (!implementsMethod(method)) {
101
						if (!implementsMethod(method)) {
101
							addDefaultAbstractMethod(method);
102
							addDefaultAbstractMethod(method);
102
							hasAddedMethods = true;
103
						}
103
						}
104
					}
104
					}
105
105
Lines 112-124 Link Here
112
				}
112
				}
113
			}
113
			}
114
		}
114
		}
115
		if (hasAddedMethods) {
116
			// re-sort methods
117
			int length = this.methods.length;
118
			if (length > 1) {
119
				ReferenceBinding.sortMethods(this.methods, 0, length - 1);
120
			}
121
		}
122
	}
115
	}
123
}
116
}
124
/* Add a new synthetic field for <actualOuterLocalVariable>.
117
/* Add a new synthetic field for <actualOuterLocalVariable>.

Return to bug 137744