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.
======================================================================