jdk/src/share/classes/java/lang/Class.java
changeset 18244 a1031f4526b2
parent 18234 996e8c4c858d
child 18253 4323a5fe8bc4
equal deleted inserted replaced
18243:176cb77883eb 18244:a1031f4526b2
  2336                 String name = this.getName();
  2336                 String name = this.getName();
  2337                 int i = name.lastIndexOf('.');
  2337                 int i = name.lastIndexOf('.');
  2338                 if (i != -1) {
  2338                 if (i != -1) {
  2339                     // skip the package access check on a proxy class in default proxy package
  2339                     // skip the package access check on a proxy class in default proxy package
  2340                     String pkg = name.substring(0, i);
  2340                     String pkg = name.substring(0, i);
  2341                     if (!Proxy.isProxyClass(this) || !pkg.equals(ReflectUtil.PROXY_PACKAGE)) {
  2341                     if (!Proxy.isProxyClass(this) || ReflectUtil.isNonPublicProxyClass(this)) {
  2342                         s.checkPackageAccess(pkg);
  2342                         s.checkPackageAccess(pkg);
  2343                     }
  2343                     }
  2344                 }
  2344                 }
  2345             }
  2345             }
  2346             // check package access on the proxy interfaces
  2346             // check package access on the proxy interfaces