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

RegTest-test tools/javac/UnterminatedLineComment.java failed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux, solaris_8, windows_98, windows_xp

      Description



      Name: asR10013 Date: 09/02/2002


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.1-b21
      Testbase : RegTest-test
      Platform[s] : Solaris 8-x86 (32), Linux (32), Windows (32)
      JCK test owner : http://javaweb.eng/jck/usr/owners.jto
      Falling test[s]:
              tools/javac/UnterminatedLineComment.java

      The tools/javac/UnterminatedLineComment.java regression test failes on JDK1.4.1-b21.
      The cause of the failure is that javac in b21 (at least for platforms listed above)
      does not handle the unterminated end-of-line comments as the b19 version did.

      The Java language specification states that the end-of-line comments must be
      terminated with an end-of-line character:

      EndOfLineComment:
                    / / CharactersInLine(opt) LineTerminator

      test source:
      ============

      /*
       * @test %W% %E%
       * @bug 4316827
       * @summary No diagnostic reported for "//" with no following LineTerminator
       *
       * @run compile/fail UnterminatedLineComment.java
       */

      /* Note: this test file is carefully crafted to end with a single-line
       * comment that is NOT followed by a newline. If you edit this file,
       * please make sure your editor does not insert a newline there.
       */

      //

      jtr file location:
      ==================
      /net/jtgb4u4c.eng/export/sail15/results/hopper/b21/regtest/i386/s8_client_linux-10/workDir/test/tools/javac/UnterminatedLineComment.jtr


      How to reproduce:
      =================

      Compile the source listed above (note that there are no characters after "//")
      or tools/javac/UnterminatedLineComment.java
      on b21 version of javac.
      The compilation will pass successfully.



      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              gafter Neal Gafter
              Reporter:
              alssunw Als Als (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: