Community
Participate
Working Groups
Created attachment 262732 [details] Test Code that is using both generic and raw types fails to compile with Eclipse 4.6 Neon, but compiles with Oracle Java compiler and Eclipse 4.5 Mars. Test cases attached. Raw types can come from third party library, one shouldn't have to abandon generics to use them.
The example is rejected since the fix for Bug 473657. I'm quite certain that this change is correct. When comparing the compiler against javac, the first thing that comes to my mind is: javac is known to have a fundamental flaw in handling raw types during type inference: https://bugs.openjdk.java.net/browse/JDK-8026527 JDT has invested significant efforts in emulating that javac bug, but due to lack of precise description of the extent of that bug, it is impossible to 100% accurately reproduce javac's behavior in this regard. Until proven wrong (by rigorous argumentation based on JLS), I'll claim that ecj is correct in this regard. I may be wrong, but I personally will not invest my spare time in further investigation. Anybody? PS: We all know JLS 4.8: "The use of raw types is allowed only as a concession to compatibility of legacy code. The use of raw types in code written after the introduction of generics into the Java programming language is strongly discouraged. It is possible that future versions of the Java programming language will disallow the use of raw types." In that light I'd also wonder about the vitality of a library that hasn't adjusted to the introduction of generics more than a decade ago - but that's only one piece in the puzzle. I personally see more good in improving support for Java 8 code, rather than 1.4.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.