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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 6u22
    • Fix Version/s: 6
    • Component/s: tools
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: