< prev index next >

src/java.base/share/classes/java/lang/reflect/Proxy.java

Print this page

        

@@ -847,10 +847,12 @@
          * 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.isIndirectType())
+                    c = c.asPrimaryType();
                 type = Class.forName(c.getName(), false, ld);
             } catch (ClassNotFoundException e) {
             }
             if (type != c) {
                 throw new IllegalArgumentException(c.getName() +
< prev index next >