< prev index next >

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

Print this page
rev 47452 : imported patch jdk-new-asmv6.patch

@@ -404,12 +404,21 @@
      * @return the Java type corresponding to the return type of the given
      *         method descriptor.
      */
     public static Type getReturnType(final String methodDescriptor) {
         char[] buf = methodDescriptor.toCharArray();
-        return getType(buf, methodDescriptor.indexOf(')') + 1);
+        int off = 1;
+        while (true) {
+            char car = buf[off++];
+            if (car == ')') {
+                return getType(buf, off);
+            } else if (car == 'L') {
+                while (buf[off++] != ';') {
     }
+            }
+        }
+    }
 
     /**
      * Returns the Java type corresponding to the return type of the given
      * method.
      *
< prev index next >