< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java

Print this page

        

@@ -594,11 +594,11 @@
         int pos = 0;
         if (getChar(signature, 0) == '<') {
             pos = checkTypeParameters(signature, pos);
         }
         pos = checkClassTypeSignature(signature, pos);
-        while (getChar(signature, pos) == 'L') {
+        while (getChar(signature, pos) == 'L' || getChar(signature, pos) == 'Q') {
             pos = checkClassTypeSignature(signature, pos);
         }
         if (pos != signature.length()) {
             throw new IllegalArgumentException(signature + ERROR_AT + pos);
         }

@@ -622,22 +622,22 @@
         int pos = 0;
         if (getChar(signature, 0) == '<') {
             pos = checkTypeParameters(signature, pos);
         }
         pos = checkChar('(', signature, pos);
-        while ("ZCBSIFJDL[T".indexOf(getChar(signature, pos)) != -1) {
+        while ("ZCBSIFJDLQ[T".indexOf(getChar(signature, pos)) != -1) {
             pos = checkJavaTypeSignature(signature, pos);
         }
         pos = checkChar(')', signature, pos);
         if (getChar(signature, pos) == 'V') {
             ++pos;
         } else {
             pos = checkJavaTypeSignature(signature, pos);
         }
         while (getChar(signature, pos) == '^') {
             ++pos;
-            if (getChar(signature, pos) == 'L') {
+            if (getChar(signature, pos) == 'L' || getChar(signature, pos) == 'Q') {
                 pos = checkClassTypeSignature(signature, pos);
             } else {
                 pos = checkTypeVariableSignature(signature, pos);
             }
         }

@@ -749,11 +749,16 @@
         // SimpleClassTypeSignature:
         //   Identifier [TypeArguments]
         // ClassTypeSignatureSuffix:
         //   . SimpleClassTypeSignature
         int pos = startPos;
-        pos = checkChar('L', signature, pos);
+        if (getChar(signature, pos) == 'L' || getChar(signature, pos) == 'Q') {
+            pos = pos + 1;
+        } else {
+            throw new IllegalArgumentException(signature + ": 'L' or 'Q' expected at index " + pos);
+        }
+
         pos = checkSignatureIdentifier(signature, pos);
         while (getChar(signature, pos) == '/') {
             pos = checkSignatureIdentifier(signature, pos + 1);
         }
         if (getChar(signature, pos) == '<') {
< prev index next >