j2sdk1.4.1 doesn't support comments after the last bracket

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.4.1
    • Component/s: tools
    • x86
    • windows_2000

      I used javac of j2sdk1.4.1 to compile the following codes:
      public class comment {
        public static void main(String argv[]) {
          System.out.println("comment");
        }
      } //end comment

      But the compiler complaint:
      comment.java:5: unclosed comment
      } //end comment
      1 error

      The more intesting thing is when I add a blank line after the whole source file, it is ok.

      I think you may search a \n after // as the end of the comment, but if the comment locates at the last line of the file, it cause problem.

      ###@###.###

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: