< prev index next >
src/java.base/share/classes/java/lang/reflect/Proxy.java
Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd
@@ -847,15 +847,15 @@
* Ensure the given class is visible to the class loader.
*/
private static void ensureVisible(ClassLoader ld, Class<?> c) {
Class<?> type = null;
try {
+ if (c.isInlineClass() && c.isNullableType()) c = c.asPrimaryType();
type = Class.forName(c.getName(), false, ld);
} catch (ClassNotFoundException e) {
}
- // use box type to do visibility check
- if (type != c.asBoxType()) {
+ if (type != c) {
throw new IllegalArgumentException(c.getName() +
" referenced from a method is not visible from class loader");
}
}
< prev index next >