< prev index next >

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

Print this page
*** 877,11 ***
              Class<?> type = null;
              try {
                  type = Class.forName(c.getName(), false, ld);
              } catch (ClassNotFoundException e) {
              }
!             if (type != c) {
                  throw new IllegalArgumentException(c.getName() +
                          " referenced from a method is not visible from class loader");
              }
          }
  
--- 877,11 ---
              Class<?> type = null;
              try {
                  type = Class.forName(c.getName(), false, ld);
              } catch (ClassNotFoundException e) {
              }
!             if (type.asPrimaryType() != c.asPrimaryType()) {
                  throw new IllegalArgumentException(c.getName() +
                          " referenced from a method is not visible from class loader");
              }
          }
  
< prev index next >