< prev index next > src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java
Print this page
/*
- * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* bootstrap class loader)
*/
private static Class<?> parseSig(String str, int[] i, int end, ClassLoader loader) {
if (i[0] == end) return null;
char c = str.charAt(i[0]++);
- if (c == 'L') {
+ if (c == 'L' || c == 'Q') {
int begc = i[0], endc = str.indexOf(';', begc);
if (endc < 0) return null;
i[0] = endc+1;
String name = str.substring(begc, endc).replace('/', '.');
try {
- return Class.forName(name, false, loader);
+ Class<?> clz = Class.forName(name, false, loader);
+ return c == 'Q' ? clz.asValueType() : clz.asPrimaryType();
} catch (ClassNotFoundException ex) {
throw new TypeNotPresentException(name, ex);
}
} else if (c == '[') {
Class<?> t = parseSig(str, i, end, loader);
< prev index next >