Java compiler can not compile a file ended with comment. If you add a new empty line at end of file, it works fine.
The problem comes out with Hopper b08 and later builds
How to produce it:
1) set JAVA_HOME to the hopper build14
2) compile the attached file Test.java
You should observe
lwang:/home/lw129730( 106 )%javac Test.java
Test.java:7: unclosed comment
//This is a comment
^
1 error
The problem comes out with Hopper b08 and later builds
How to produce it:
1) set JAVA_HOME to the hopper build14
2) compile the attached file Test.java
You should observe
lwang:/home/lw129730( 106 )%javac Test.java
Test.java:7: unclosed comment
//This is a comment
^
1 error
- duplicates
-
JDK-4316827 No diagnostic reported for "//" with no following LineTerminator
- Closed