Community
Participate
Working Groups
Hi! The following piece of code compiles with Eclipse 3.1 and the Java compiler, but in Eclipse 3.1.1 it fails in the marked line. The list "list" is parametrized by a restricted generic parameter C. C has to derive from "Notifyble", an interface, that contains a parametrized notify-method. Explicit casting to "Notifyable" helps, but should not be necessary import java.util.List; public class NotifyMethodProblem { public static interface Notifyable { public Object notify(Object msg); } public static class InnerClass<C extends Notifyable> { private List<C> list; public InnerClass() { // *** Here: the notify-method is not available this.list.get(0).notify(null); // The following line compiles without problems. ((Notifyable) this.list.get(0)).notify(null); } } } Best regards Volker
Created attachment 28094 [details] The test program
Added GenericTypeTest test853 Released into HEAD and 3.1.2 stream
*** Bug 113560 has been marked as a duplicate of this bug. ***
*** Bug 113710 has been marked as a duplicate of this bug. ***
reopening for setting owner
closing (again)
Verified for 3.1.2 using build M20060109-1200.
Verified for 3.2 M4 using build I20051215-1506.