-
Bug
-
Resolution: Fixed
-
P5
-
1.2.2
-
rc
-
generic
-
generic
-
Verified
Name: wl91122 Date: 08/30/99
The JLS, section 3.10.5 does not mention that a String literal
can't contain \u0022 (") unicode characters.
The following code:
public class StringTest {
{
System.out.println("Hello\u0022World");
}
}
leads to this error:
C:\DATA\java>javac StringTest.java
StringTest.java:3: ')' expected.
System.out.println("Hello\u0022World");
^
StringTest.java:3: String not terminated at end of line.
System.out.println("Hello\u0022World");
^
2 errors
(Can be solved by either changing the JLS or by changing the
compiler)
(Review ID: 94595)
======================================================================
- relates to
-
JDK-4643106 characters \u0000 and \u001a not accepted in identifiers
- Closed
-
JDK-6746458 writing libraries in Java for non-Java languages requires support for exotic identifiers
- Closed
-
JDK-8232632 3.10.4: Explicitly mention that character literals can't contain \u0027 (') characters
- Resolved