src/jdk/nashorn/internal/runtime/Context.java
Print this page
*** 646,656 ****
/**
* Checks that the given Class can be accessed from no permissions context.
*
* @param clazz Class object
! * @throw SecurityException if not accessible
*/
public static void checkPackageAccess(final Class<?> clazz) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
Class<?> bottomClazz = clazz;
--- 646,656 ----
/**
* Checks that the given Class can be accessed from no permissions context.
*
* @param clazz Class object
! * @throws SecurityException if not accessible
*/
public static void checkPackageAccess(final Class<?> clazz) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
Class<?> bottomClazz = clazz;
*** 663,673 ****
/**
* Checks that the given package name can be accessed from no permissions context.
*
* @param pkgName package name
! * @throw SecurityException if not accessible
*/
public static void checkPackageAccess(final String pkgName) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
checkPackageAccess(sm, pkgName.endsWith(".") ? pkgName : pkgName + ".");
--- 663,673 ----
/**
* Checks that the given package name can be accessed from no permissions context.
*
* @param pkgName package name
! * @throws SecurityException if not accessible
*/
public static void checkPackageAccess(final String pkgName) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
checkPackageAccess(sm, pkgName.endsWith(".") ? pkgName : pkgName + ".");