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

Collapse All | Expand All

(-)dom/org/eclipse/jdt/core/dom/BindingComparator.java (-4 / +3 lines)
Lines 168-183 Link Here
168
			return true;
168
			return true;
169
		}
169
		}
170
	}
170
	}
171
	// TODO (olivier) should optimize to use switch(binding.kind()) & modifier bitmask comparisons
172
	static boolean isEqual(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding, org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding2, HashSet visitedTypes) {
171
	static boolean isEqual(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding, org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding2, HashSet visitedTypes) {
173
		if (typeBinding == typeBinding2)
172
		if (typeBinding == typeBinding2)
174
			return true;
173
			return true;
175
		if (typeBinding == null || typeBinding2 == null)
174
		if (typeBinding == null || typeBinding2 == null)
176
			return false;
175
			return false;
177
176
178
		if (visitedTypes.contains(typeBinding)) return true;
179
		visitedTypes.add(typeBinding);
180
		
181
		switch (typeBinding.kind()) {
177
		switch (typeBinding.kind()) {
182
			case Binding.BASE_TYPE :
178
			case Binding.BASE_TYPE :
183
				if (!typeBinding2.isBaseType()) {
179
				if (!typeBinding2.isBaseType()) {
Lines 213-218 Link Here
213
					&& wildcardBinding.boundKind == wildcardBinding2.boundKind;
209
					&& wildcardBinding.boundKind == wildcardBinding2.boundKind;
214
				
210
				
215
			case Binding.TYPE_PARAMETER :
211
			case Binding.TYPE_PARAMETER :
212
				if (visitedTypes.contains(typeBinding)) return true;
213
				visitedTypes.add(typeBinding);
214
				
216
				if (!(typeBinding2.isTypeVariable())) {
215
				if (!(typeBinding2.isTypeVariable())) {
217
					return false;
216
					return false;
218
				}
217
				}

Return to bug 99978