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

javadoc fails to parse assert statements correctly.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • tools



      Name: boT120536 Date: 08/31/2001


      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)


      Run the following command on the source provided:

      % javadoc -source 1.4 Test.java

      Here's Test.java:

      /**
       * test class.
       **/
      public class Test {
          /**
           * test method.
           **/
          public static void main(String[] args) {
      assert args.length == 0;
          }
      }

      Here's the result:

      Loading source file Test.java...
      Test.java:9: ';' expected
      assert args.length == 0;
      ^
      1 error
      1 warning

      Note that the following command works as expected.

      % javac -source 1.4 Test.java
      (Review ID: 131163)
      ======================================================================

            darcy Joe Darcy
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: