OpenJDK / jdk / hs
changeset 45658:0c39b586b8fa
8181295: Document that SecurityManager::checkPackageAccess may be called by the VM
Reviewed-by: mchung
author | mullan |
---|---|
date | Mon, 19 Jun 2017 08:16:03 -0400 |
parents | 95e63aeac2e8 |
children | 7f2f12fd6a3e |
files | jdk/src/java.base/share/classes/java/lang/SecurityManager.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/src/java.base/share/classes/java/lang/SecurityManager.java Mon Jun 19 07:19:27 2017 +0300 +++ b/jdk/src/java.base/share/classes/java/lang/SecurityManager.java Mon Jun 19 08:16:03 2017 -0400 @@ -1496,7 +1496,10 @@ * Throws a {@code SecurityException} if the calling thread is not allowed * to access the specified package. * <p> - * This method is called by the {@code loadClass} method of class loaders. + * During class loading, this method may be called by the {@code loadClass} + * method of class loaders and by the Java Virtual Machine to ensure that + * the caller is allowed to access the package of the class that is + * being loaded. * <p> * This method checks if the specified package starts with or equals * any of the packages in the {@code package.access} Security Property.