Name: ks84122 Date: 03/08/2004
Compiling javac's com.sun.tools.javac.Main class causes errors, because of unresolved statically imported fields. Reproduced in b41, but looks like it's being introduced in b40.
Seems like ClassReader's complete(ClassSymbol sym) method's call to flush the annotator (annotate.flush()) causes premature merging of statics into the importing scope. This happens when classes from libraries are being loaded and attributed while entering discovered sources.
In order to reproduce it:
1. Rename com.sun.tools.javac package to com.sun.tools.new_javac (this way the compiler won't find the classes in tools.jar.)
2 Execute the following command (fix the paths first.)
D:\jdk15.b32c\jdk1.5.0\bin\javac -source 1.5 -target 1.5 -sourcepath test_src -d testclasses3 test_src\com\sun\tools\new_javac\Main.java
Release Regression From : 1.5
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Incident Review ID: 242587)