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

CompileCommand does not accept all JLS-conformant class/method names

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 9
    • hs25
    • hotspot
    • b48
    • generic
    • generic

        According to JLS, identifier name may contain any character that is java letter or digit. For such characters Character.isJavaIdentifierPart return true.

        CompileCommand accepts only subset of these characters, so you can't specify some methods in CompileCommand:

        it does not works with 0x01 (note that Character.isJavaIdentifierPart(1) returns true):

        $jdk1.8.0/fastdebug/bin/java -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest.methodWithUnicode\u0001"` UnicodeIdentifierTest
        CompilerOracle: unrecognized line
          "exclude UnicodeIdentifierTest methodWithUnicode"
          Unrecognized text after command: 
        Can I use \u0001 in identifier name? yes

        but works fine with 0xff:

        $ jdk1.8.0/fastdebug/bin/java -XX:CompileCommand=exclude,`echo -e "UnicodeIdentifierTest.methodWithUnicode\u00ff"` UnicodeIdentifierTest
        CompilerOracle: exclude UnicodeIdentifierTest.methodWithUnicode\u00ff
        Can I use \u0001 in identifier name? yes

        Possible workaround is to use wildcards.

        ILW = MLL => P5.

              neliasso Nils Eliasson (Inactive)
              fzhinkin Filipp Zhinkin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: