-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 27
-
Component/s: tools
See discussion here:
https://mail.openjdk.org/pipermail/compiler-dev/2026-January/032484.html
In short, comparing two array types should delegate to equality of their component types. Instead, javac uses a more complex routine (containsTypeEquivalent) that, in case equality fails, will check whether the types contain each other. Since this test only makes a difference with wildcards, and since wildcards cannot be array component types, this code should be simplified.
https://mail.openjdk.org/pipermail/compiler-dev/2026-January/032484.html
In short, comparing two array types should delegate to equality of their component types. Instead, javac uses a more complex routine (containsTypeEquivalent) that, in case equality fails, will check whether the types contain each other. Since this test only makes a difference with wildcards, and since wildcards cannot be array component types, this code should be simplified.