diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java index de65cab1caf..871f9fe03db 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java @@ -1267,7 +1267,7 @@ protected List> allSuperPairsWithCommonGenericType(TypeBinding if (s == null || s.id == TypeIds.T_JavaLangObject || t == null || t.id == TypeIds.T_JavaLangObject) return Collections.emptyList(); List> result = new ArrayList<>(); - if ((s.isParameterizedType() || t.isParameterizedType()) // optimization #1: clients of this method only want to inspect type arguments + if (s.isParameterizedType() && t.isParameterizedType() // optimization #1: clients of this method only want to compare type arguments && TypeBinding.equalsEquals(s.original(), t.original())) { result.add(new Pair<>(s, t)); }