JDK-6507334 : Generic compiler signals ambiguous method declaration although signatures already differ
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-12-21
  • Updated: 2010-04-26
  • Resolved: 2007-01-03
Related Reports
Duplicate :  
Description
java version "1.6.0"
  Java(TM) SE Runtime Environment (build 1.6.0-b105)
  Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
 
Does this problem occur on J2SE 1.4.x or 5.0.x ?  Yes / No (pick one)
  1.4 N/A.
  5.0 No. Enclosed source compiles with JDK 1.5.0_10.
 
 
Operating System Configuration Information (be specific):
  Microsoft Windows XP Professional Version 2002 Service Pack 2 (DE)
 
Hardware Configuration Information (be specific):
   Sony Vaio VGN-VS 1.60 GHz, 1 GB RAM
 
 
Bug Description:
  Generic Compiler signals ambiguous method declaration although signatures 
  already differ concerning their raw types.
 
Steps to Reproduce (be specific):
 
Compile enclosed Java source.
The JDK 6 generics compiler indicates the following message:

A.java:44: reference to get is ambiguous, both method <T>get(A.B<? super S,T>) in A.D<capture#0 of ?> and method get(A.C<? super S>) in A.D<capture#0 of ?> match
We suppose that this is a compiler bug because the two methods already differ in their raw type signatures.

In addition, the source compiles with JDK 1.5.0.