Summary: | Eclipse compiler is in violation of Java Language Specification | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Emir Alikadic <ealikadic> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | CC: | eclipse |
Version: | 3.0 | ||
Target Milestone: | 3.0 M5 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Emir Alikadic
2003-10-24 15:48:49 EDT
I think it's a problem with the expansion of the special field 'class'. If I replace 'MyConstant.class' by 'Class.forName("MyConstant")', it's working fine with the Eclipse compiler. If I replace it by 'Class.forName("[LMyConstant;").getComponentType()' (the expansion done by the Eclipse compiler), it's not working with the Eclipse compiler or with javac. This is exactly it. The language spec is changing to avoid class initialization on class literals. We have converted, Jikes has converted too. Javac hasn't yet. yes, I found the original bug *** This bug has been marked as a duplicate of 37565 *** Actually, the spec hasn't changed. It is only a compiler implementation issue. Javac confessed the bug: http://developer.java.sun.com/developer/bugParade/bugs/4419673.html |