Bug 271969

Summary: inconsistency with javac -- static methods + overloading + generic
Product: [Eclipse Project] JDT Reporter: Tom Huybrechts <tom.huybrechts>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, srikanth_sankaran
Version: 3.4.2   
Target Milestone: 3.5 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
project none

Description Tom Huybrechts CLA 2009-04-12 18:18:00 EDT
Created attachment 131589 [details]
project

The code for Hudson (https://hudson.dev.java.net) compiles with javac, but not with JDT. 

The problem is a method like this:
   public static <T> ExtensionList<T> create(Hudson hudson, Class<T> type)
that exists in a class and its subclass.

When a third class refers to both methods, the reference to the static method in the subclass causes a compile error:

The method create(Hudson, Class) is ambiguous for the type  DescriptorExtensionList	

I added the minimal code to reproduce this problem in an attachment.
Comment 1 Kent Johnson CLA 2009-04-13 12:46:43 EDT
Reproduced with 3.4.2

But it works fine with the 3.5M6 build
Comment 2 Kent Johnson CLA 2009-04-13 12:47:18 EDT
Tom - please try your complete project with the 3.5M6 build and reopen this bug if it fails for you.

thx
Comment 3 Tom Huybrechts CLA 2009-04-18 16:45:11 EDT
Confirmed that this works for the full project too with 3.5M6
Comment 4 Jay Arthanareeswaran CLA 2009-04-28 09:38:57 EDT
Verified by the Reporter