javac erroneously compiles // style comment containing '\u000A'

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P5
    • None
    • Affects Version/s: 1.1.3
    • Component/s: tools
    • None
    • generic
    • solaris_2.5.1

      vvvvv martin.fujitani@Eng 1997-11-14 vvvvv

      TO REPRODUCE
      ============
      javac -debug -verbose mystring.java

      mystring.java contains the following comments:

      // /* '\u000A', */
      // '\u000A',
      /* '\u000A', */
      // the // comment doesn't work for the line above.
      // the javac tries to compile it.



      SYMPTOMS
      =========
      [parsed mystring.java in 2314 ms]
      [loaded c:\martinf\jdk1.1.3\bin\..\lib\classes.zip(java/lang/Object.class) in 12
      0 ms]
      mystring.java:11: Invalid character constant.
      // /* '\u000A', */
                     ^
      mystring.java:11: Class or interface declaration expected.
      // /* '\u000A', */
                     ^
      mystring.java:12: Invalid character constant.
      // '\u000A',
                 ^


      ^^^^^ martin.fujitani@Eng 1997-11-14 ^^^^^

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: