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

javadoc fails with "illegal forward reference"; javac compiles fine

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 6
    • 6u22
    • tools
    • None

      javadoc fails on the following class (javac compiles it without error):

      $ cat JD2.java
      public class JD2 {

          static class A {}

          public static final A[] LIST = { new A() {} };

          public static final int COUNT = LIST.length;
      }

      $ /java/re/jdk/6u22/promoted/all/b04/binaries/solaris-i586/bin/javadoc JD2.java
      Loading source file JD2.java...
      Constructing Javadoc information...
      Standard Doclet version 1.6.0_22
      Building tree for all the packages and classes...
      Generating JD2.html...
      JD2.java:7: illegal forward reference
          public static final int COUNT = LIST.length;
                                          ^
      Generating package-frame.html...
      Generating package-summary.html...
      Generating package-tree.html...
      Generating constant-values.html...
      Building index for all the packages and classes...
      Generating overview-tree.html...
      Generating index-all.html...
      Generating deprecated-list.html...
      Building index for all classes...
      Generating allclasses-frame.html...
      Generating allclasses-noframe.html...
      Generating index.html...
      Generating help-doc.html...
      Generating stylesheet.css...
      1 error

            Unassigned Unassigned
            sdolgovorcl Sergey Dolgov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: