-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.1
-
x86
-
windows_2000
Name: gm110360 Date: 06/21/2002
FULL PRODUCT VERSION :
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
The JDK 1.4.1-beta compiler doesn't handle single line
comments at the end of the file, if there is no line break
after the comment.
REGRESSION. Last worked in version 1.4
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Try to compile the following class:
public class Test {
} // comment
When pasting the above class into a text file, you must
ensure that the file ends immediately after the 't' in the
word 'comment', meaning there is NO line break after it.
EXPECTED VERSUS ACTUAL BEHAVIOR :
The class should compile with no errors.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
N:\java\jdk1.4.1-beta\bin>javac N:\dev\crapola\Test.java
N:\dev\crapola\Test.java:2: unclosed comment
} // comment
^
1 error
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Test {
} // comment
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Put a line break after the comment.
Release Regression From : 1.4.0_01
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 153965)
======================================================================
- duplicates
-
JDK-4316827 No diagnostic reported for "//" with no following LineTerminator
- Closed