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

Java compiler can not compile a file ended with comment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_8

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: