From 8cfbc03ac94b61900962828a1c4d6ded64925cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Wed, 18 Dec 2024 12:57:11 +0100 Subject: [PATCH] remove LocalTypeBinding.hashCode() #3412 Since LocalTypeBinding does not override equals() any custom hashCode() implementation is likely to introduce hash collisions. Especially for same "enclosingType" but different "enclosingCase" https://github.com/eclipse-jdt/eclipse.jdt.core/issues/3412 --- .../jdt/internal/compiler/lookup/LocalTypeBinding.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java index 3ff27dde94e..8bb420afd0c 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java @@ -165,10 +165,6 @@ public TypeBinding clone(TypeBinding outerType) { return copy; } -@Override -public int hashCode() { - return this.enclosingType.hashCode(); -} /* * Overriden for code assist. In this case, the constantPoolName() has not been computed yet. * Slam the source name so that the signature is syntactically correct.