Summary: | [1.5][compiler] Eclipse compiler fails with <?> generics | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Christophe Fondacci <christophefondacci> |
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
Status: | VERIFIED WORKSFORME | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | amj87.iitr, jarthana, Olivier_Thomann |
Version: | 3.6 | Keywords: | needinfo |
Target Milestone: | 3.6 M6 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Christophe Fondacci
2010-02-10 12:49:29 EST
Please attach a code snippet that shows the problem. In the comment 0, 'e' is not defined. The listener interface doesn't define any method. Thanks. Hello Christophe, Per comment#1 can you post a small but full program that shows the problem ? As it is, we can make no progress whatsoever and will have to close this as WORKSFORME. The following program elicits a very similar warning from eclipse, but it also gets the same warning from javac5,6,7. import java.util.Collection; interface Task<T> { Collection<TaskListener<T>> getTaskListeners(); } interface TaskListener<T> { void taskFailed(Task<T> task); } public class Test { public void driver(Collection<Task<?>> tasks){ for (final Task<?> task : tasks) { for (final TaskListener<?> listener : task.getTaskListeners()) { listener.taskFailed(task); } } } } Please reopen if a test case becomes available. The posted incomplete code snippet when "reasonably" completed via quick fixes results in code which is treated identically by eclipse as by javac as shown by comment#3 Verified for 3.6M6 using build I20100305-1011. Verified Sorry, back from holidays... While trying to extract a small test case I was not able to reproduce this problem either. This must be related to a specific use case. As soon as I reproduce it, I will re-open it. Until then, keeping it closed is fine. Sorry for the lack of feedbacks |