Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2191179 | 7 | Maurizio Cimadamore | P4 | Closed | Fixed | b130 |
JDK 5.0 Update 17 javac compiler fails with incorrect error message.
The expected error message is:
% /jdk1.5.0_16/bin/javac T.java
T.java:14: name clash: m(java.util.List<java.lang.String>) and m(java.util.List<java.lang.Integer>) have the same erasure
public void m(List<String> l1) {
^
T.java:18: name clash: m(java.util.List<java.lang.Integer>) and m(java.util.List<java.lang.String>) have the same erasure
public void m(List<Integer> l2) {
^
2 errors
%
The observed error message is:
% /jdk1.5.0_17/bin/javac T.java
T.java:18: name clash: m(java.util.List<java.lang.Integer>) and m(java.util.List<java.lang.String>) have the same erasure
public void m(List<Integer> l2) {
^
T.java:11: m(java.util.List<java.lang.String>) in T cannot be applied to (java.util.List<java.lang.Integer>)
mc.m(l2);
^
2 errors
%
The expected error message is:
% /jdk1.5.0_16/bin/javac T.java
T.java:14: name clash: m(java.util.List<java.lang.String>) and m(java.util.List<java.lang.Integer>) have the same erasure
public void m(List<String> l1) {
^
T.java:18: name clash: m(java.util.List<java.lang.Integer>) and m(java.util.List<java.lang.String>) have the same erasure
public void m(List<Integer> l2) {
^
2 errors
%
The observed error message is:
% /jdk1.5.0_17/bin/javac T.java
T.java:18: name clash: m(java.util.List<java.lang.Integer>) and m(java.util.List<java.lang.String>) have the same erasure
public void m(List<Integer> l2) {
^
T.java:11: m(java.util.List<java.lang.String>) in T cannot be applied to (java.util.List<java.lang.Integer>)
mc.m(l2);
^
2 errors
%
- backported by
-
JDK-2191179 javac 1.5.0_17 fails with incorrect error message
- Closed
- relates to
-
JDK-6682380 Foreach loop with generics inside finally block crashes javac with -target 1.5
- Closed
-
JDK-6908806 JDK 1.5.0 Update 17 javac fails to compile java code using generics
- Closed