From 79091ce402e82893f5002653f36af710a629d4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Wed, 18 Dec 2024 13:07:03 +0100 Subject: [PATCH] remove WildcardBinding.hashCode() #3412 Since WildcardBinding does not override equals() any custom hashCode() implementation is likely to introduce hash collisions. Especially for same "genericType" but different "bound" https://github.com/eclipse-jdt/eclipse.jdt.core/issues/3412 --- .../jdt/internal/compiler/lookup/WildcardBinding.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java index 2a69d855e28..1134e500d8e 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java @@ -614,11 +614,6 @@ public char[] genericTypeSignature() { return this.genericSignature; } - @Override - public int hashCode() { - return this.genericType.hashCode(); - } - @Override public boolean hasTypeBit(int bit) { if (this.typeBits == TypeIds.BitUninitialized) {