These characters satisfy Character.isJavaIdentifierPart but are not
accepted in identifiers.
Comments
EVALUATION
The bug for which this CR was originally submitted -- that \u0000 and \u001a
are not accepted as parts of identifiers -- was apparently fixed in JDK 5.
Regarding specifications, JLS3 3.8 indicates that while "ignorable"
characters may be used in identifiers, they are *not* ignored for the
purpose of comparing identifiers. The documentation (and even the name) of
Character.isIdentifierIgnorable is at best misleading on this point, and
should be updated. That is tracked by CR 6214519.
13-07-2007
EVALUATION
I see no place in the JLS or in javac (1.6) which disallows \u0000 and \u001a in identifiers.
As for the previous Evaluation: what is an ignorable character? Why should \u0000 or \u001a - which are not escapes (see 4266845) - be ignored in an identifer? 'in\u0000t' does not have the same spelling (Unicode character sequence) as the 'int' keyword, and is an identifier.
13-07-2007
EVALUATION
There is also a specification issue here. The JLS neglects to provide any guidance on how to treat ignorable characters. Recategorizing as a spec issue
until the spec is clear. (what about in\u0000t ? Is that a keyword
or an identifier?)
###@###.### 2002-03-09
Yes, we've had an ongoing discussion of this. JLS 3 and/or
java.lang.Character javadoc need to address this.
###@###.### 2002-03-11