JDK-7024053 : Result of Character.isJavaIdentifierPart(char) is different from JDK6's one.
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86
  • Submitted: 2011-03-03
  • Updated: 2012-03-20
  • Resolved: 2011-03-08
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
build 1.7.0-ea-b130

ADDITIONAL OS VERSION INFORMATION :
Windows7 SP1 64bit

A DESCRIPTION OF THE PROBLEM :
I checked the result of
 Character.isJavaIdentifierPart('\u30fb').

On JDK6 it is true,
but on JDK7 it is false.

So Eclipse Java editor marks the charcter as 'Invalid Character'
when it runs on JDK7.
And you can't compile the class using this character as JavaIdentifierPart on JDK7.

REGRESSION.  Last worked in version 6

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a class
2. In the class, print the result of this method
  System.out.println( Character.isJavaIdentifierPart('\u30fb') );
3. Compile and run it on JDK6.
4. Compile and run it on JDK7.
5. See

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expect Step 4. shows 'true'
ACTUAL -
Step4. shows 'false'

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Not use this character.

But I can't know which characters should I avoid.

Comments
EVALUATION The character properties for U+30FB has changed in Unicode 4.1.0. 4.0.0/UnicodeData.txt:30FB;KATAKANA MIDDLE DOT;Pc;0;ON;;;;;N;;;;; 4.1.0/UnicodeData.txt:30FB;KATAKANA MIDDLE DOT;Po;0;ON;;;;;N;;;;; 6.0.0/UnicodeData.txt:30FB;KATAKANA MIDDLE DOT;Po;0;ON;;;;;N;;;;; Closing this CR as a duplicate of 6990687.
08-03-2011

EVALUATION Character.is*() methods have been designed to be consistent with the Unicode version in the Character class description. This isn't a regression bug. The compatibility problem with Unicode upgrades exists since JDK 1.1.
08-03-2011