Name: igT44549 Date: 02/08/99
JDK1.1.7 javac can compile the following code
with no error, but I think it is a bug of javac.
class Test {
final String = "\u001a";
}
The corespoiding Unicode character of the Unicode
Escape '\u001a' is EOF on MS Windows System.
The JLS says that the translation of Unicode
Escapes to the corresponding Unicode character
is processed before lexical analysis.
Then, lexical analysis step is applied for
the stream of the resulting of the translation,
which is
class Test { final String = "<EOF>.
I think the javac should be report an error
against the stream. However, the current
implementation of javac does not report any
error.
When the "\u000d" is written Instead of '\u001a",
the javac report an error.
It is correct behaivor.
(Review ID: 42921)
======================================================================
- relates to
-
JDK-4330479 ASCII SUB character is rejected in multi-line comments
-
- Closed
-