United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6910550 javac 1.5.0_17 fails with incorrect error message
JDK-6910550 : javac 1.5.0_17 fails with incorrect error message

Details
Type:
Bug
Submit Date:
2009-12-15
Status:
Closed
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2010-04-05
Component:
tools
OS:
solaris_10
Sub-Component:
javac
CPU:
sparc
Priority:
P3
Resolution:
Won't Fix
Affected Versions:
5.0u17
Fixed Versions:
5.0-pool

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

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
%

                                    

Comments



Hardware and Software, Engineered to Work Together