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

Java compiler can not compile a file ended with comment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.4.1
    • tools
    • sparc
    • solaris_8

      Java compiler can not compile a file ended with comment. If you add a new empty line at end of file, it works fine.

      The problem comes out with Hopper b08 and later builds

      How to produce it:
      1) set JAVA_HOME to the hopper build14
      2) compile the attached file Test.java

      You should observe

      lwang:/home/lw129730( 106 )%javac Test.java
      Test.java:7: unclosed comment
      //This is a comment
      ^
      1 error

            gafter Neal Gafter (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: