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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: hs25
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b48
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                neliasso Nils Eliasson
                Reporter:
                fzhinkin Filipp Zhinkin
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: