Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4453719

Character.isIdentifierIgnorable(0xFFFF) returns true instead of false

XMLWordPrintable

    • beta2
    • generic, x86, sparc
    • generic, linux, solaris, solaris_2.6, windows_nt
    • Verified



      Name: ooR10006 Date: 05/03/2001


      Since jdk1.4.0beta-b59 Character.isIdentifierIgnorable(0xFFFF) returns true
      instead of false.
      The spec for isIdentifierIgnorable(char) says:
      "The following Unicode characters are ignorable in a Java identifier
      or a Unicode identifier:
               ISO control characters that are not whitespace
                    '\u0000' through '\u0008'
                    '\u000E' through '\u001B'
                    '\u007F' through '\u009F'
               all characters that have the FORMAT general category value "

      According to this, 0xFFFF should not be considered as ignorable character.

      Character.isJavaIdentifierPart(char), Character.isUnicodeIdentifierPart(char)
      also return true for 0xFFFF instead of false.

      The following test shows this:

      public class Test {
          public static void main(String[] args){
              System.out.println(Character.isIdentifierIgnorable((char) 0xFFFF));
              System.out.println(Character.isJavaIdentifierPart((char) 0xFFFF));
              System.out.println(Character.isUnicodeIdentifierPart((char) 0xFFFF));
          }
      }

      % jdk1.4.0beta-b58/solsparc/bin/java Test
      false
      false
      false
      % jdk1.4.0beta-b59/solsparc/bin/java Test
      true
      true
      true
      %

      Due to this Merlin JCK tests fail:
      api/java_lang/Character/index.html#attributesFullRange[Character2067]
      api/java_lang/Character/index.html#attributesFullRange[Character2069]
      api/java_lang/Character/index.html#attributesFullRange[Character2076]

      jdk1.3.0fcsC passes the tests

      ======================================================================

            joconnersunw John Oconner (Inactive)
            ovosunw Ovo Ovo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: