Community
Participate
Working Groups
Perhaps this is just a learning curve issue, but it seems like a solid bug. I have Java 5 code involving sub-classing of a base class which I have 'genericized'. To simplify matters, I have added a main for testing. If I go through the run-launch sequence, no Problems are reported and the code executes as expected. However, in the editor view of the source code I have a half-dozen lines flagged with the light-bulb plus red-x combination. I don't know what I am supposed to call those icons, but whatever they are called, they 'shout' that something is wrong along with accompanying text and even suggested corrective actions. I've spent a lot of hours trying to eliminate the errors, including pulling the code out of Eclipse and running stand-alone tests switching between the 'modern' compiler and the external invocation of the Eclipse-internal compiler. In those modes, again, the code compiles absolutely cleanly and executes with the expected results. Of course, you will want me to send the exact error messages and even the sample code, but this seems like a general problem that must show up in many, many places irrespective of the specific diagnostic error -- or at least with any 1.5 code using generics. So, before cluttering things up with all the details, I'm hoping someone can point me to some previously-reported bug and the fix. The general symptom might be classified as "when is there a difference between diagnostic errors as reported in an editor view and diagnostic errors reported in the problem view"?
I agree this seems inconsistent. You could provide steps to recreate and then reopen ?
Ok, I have created as compact a test case as I can. The test driver should correctly produce four lines of output. It should show no errors or warnings of any kind in "Problems", but 1 line in the sub-class and 4 lines in the test driver will be flagged in the editor views as invalid.
Created attachment 20005 [details] Testcase The jar file contains: B a simple abstract base class that encapsulates a object reference. S a simple sub-class of B. T a stand-alone test driver.
Reproduced in HEAD. If the type parameter $T is renamed in T, all errors are gone.
No problem on compiler side. Added GenericTypeTest#test0986. Issue resides on JavaModel side.
Created attachment 41310 [details] Proposed patch and regression test
*** Bug 143516 has been marked as a duplicate of this bug. ***
Fix and test released for 3.3M1 in HEAD and released for 3.2.1 in TARGET_321 branch.
Verified for 3.3 M1 using build I20060807-0010
This comment is only provided so that someone, someday, doing a search will come across it. It needs to be reported that, compared to all the other open source projects we all rely upon, the professional handling by the Eclipse team far exceeds them all. Probably the folks involved in this fix weren't even born when IBM software engineers were sending out patches to the operating systems for second- and third-generation mainframes, but you can tell that they have inherited from that gene pool. There's just no substitute for hard work. Thanks.
Verified for 3.2.1 using build M20060908-1655