Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5009698

REGRESSION: Regression bug in Static Import resolution.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 5.0
    • tools
    • generic
    • generic

    Description



      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)
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              gafter Neal Gafter
              ksoshals Kirill Soshalskiy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: