JDK-6910550 : javac 1.5.0_17 fails with incorrect error message
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0u17
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2009-12-15
  • Updated: 2011-02-16
  • Resolved: 2010-04-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Fixed
Related Reports
Relates :  
Relates :  
Description
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
%