提交 0e484a39 编写于 作者: V vtewari

8177656: Closed/nashorn/JDK_8034967.java starts failing (all platforms) since 9/154

Reviewed-by: jlaskey
上级 153bf588
......@@ -114,7 +114,11 @@ final class JavaAdapterClassLoader {
@Override
public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException {
try {
Context.checkPackageAccess(name);
final int i = name.lastIndexOf('.');
if(i != -1){
final String pkgName = name.substring(0,i);
Context.checkPackageAccess(pkgName);
}
return super.loadClass(name, resolve);
} catch (final SecurityException se) {
// we may be implementing an interface or extending a class that was
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册