mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8338411: Implement JEP 486: Permanently Disable the Security Manager
Co-authored-by: Sean Mullan <mullan@openjdk.org> Co-authored-by: Alan Bateman <alanb@openjdk.org> Co-authored-by: Weijun Wang <weijun@openjdk.org> Co-authored-by: Aleksei Efimov <aefimov@openjdk.org> Co-authored-by: Brian Burkhalter <bpb@openjdk.org> Co-authored-by: Daniel Fuchs <dfuchs@openjdk.org> Co-authored-by: Harshitha Onkar <honkar@openjdk.org> Co-authored-by: Joe Wang <joehw@openjdk.org> Co-authored-by: Jorn Vernee <jvernee@openjdk.org> Co-authored-by: Justin Lu <jlu@openjdk.org> Co-authored-by: Kevin Walls <kevinw@openjdk.org> Co-authored-by: Lance Andersen <lancea@openjdk.org> Co-authored-by: Naoto Sato <naoto@openjdk.org> Co-authored-by: Roger Riggs <rriggs@openjdk.org> Co-authored-by: Brent Christian <bchristi@openjdk.org> Co-authored-by: Stuart Marks <smarks@openjdk.org> Co-authored-by: Ian Graves <igraves@openjdk.org> Co-authored-by: Phil Race <prr@openjdk.org> Co-authored-by: Erik Gahlin <egahlin@openjdk.org> Co-authored-by: Jaikiran Pai <jpai@openjdk.org> Reviewed-by: kevinw, aivanov, rriggs, lancea, coffeys, dfuchs, ihse, erikj, cjplummer, coleenp, naoto, mchung, prr, weijun, joehw, azvegint, psadhukhan, bchristi, sundar, attila
This commit is contained in:
parent
c12b386d19
commit
db85090553
1885 changed files with 5528 additions and 65650 deletions
|
@ -359,10 +359,6 @@ public final class ModuleLayer {
|
|||
* @throws LayerInstantiationException
|
||||
* If the layer cannot be created for any of the reasons specified
|
||||
* by the static {@code defineModulesWithOneLoader} method
|
||||
* @throws SecurityException
|
||||
* If {@code RuntimePermission("createClassLoader")} or
|
||||
* {@code RuntimePermission("getClassLoader")} is denied by
|
||||
* the security manager
|
||||
*
|
||||
* @see #findLoader
|
||||
*/
|
||||
|
@ -401,10 +397,6 @@ public final class ModuleLayer {
|
|||
* @throws LayerInstantiationException
|
||||
* If the layer cannot be created for any of the reasons specified
|
||||
* by the static {@code defineModulesWithManyLoaders} method
|
||||
* @throws SecurityException
|
||||
* If {@code RuntimePermission("createClassLoader")} or
|
||||
* {@code RuntimePermission("getClassLoader")} is denied by
|
||||
* the security manager
|
||||
*
|
||||
* @see #findLoader
|
||||
*/
|
||||
|
@ -440,9 +432,6 @@ public final class ModuleLayer {
|
|||
* @throws LayerInstantiationException
|
||||
* If the layer cannot be created for any of the reasons specified
|
||||
* by the static {@code defineModules} method
|
||||
* @throws SecurityException
|
||||
* If {@code RuntimePermission("getClassLoader")} is denied by
|
||||
* the security manager
|
||||
*/
|
||||
public ModuleLayer defineModules(Configuration cf,
|
||||
Function<String, ClassLoader> clf) {
|
||||
|
@ -490,10 +479,6 @@ public final class ModuleLayer {
|
|||
* a module named "{@code java.base}", or a module contains a package named
|
||||
* "{@code java}" or a package with a name starting with "{@code java.}". </p>
|
||||
*
|
||||
* <p> If there is a security manager then the class loader created by
|
||||
* this method will load classes and resources with privileges that are
|
||||
* restricted by the calling context of this method. </p>
|
||||
*
|
||||
* @param cf
|
||||
* The configuration for the layer
|
||||
* @param parentLayers
|
||||
|
@ -510,10 +495,6 @@ public final class ModuleLayer {
|
|||
* @throws LayerInstantiationException
|
||||
* If all modules cannot be defined to the same class loader for any
|
||||
* of the reasons listed above
|
||||
* @throws SecurityException
|
||||
* If {@code RuntimePermission("createClassLoader")} or
|
||||
* {@code RuntimePermission("getClassLoader")} is denied by
|
||||
* the security manager
|
||||
*
|
||||
* @see #findLoader
|
||||
*/
|
||||
|
@ -563,10 +544,6 @@ public final class ModuleLayer {
|
|||
* methods) in the module defined to the class loader before searching
|
||||
* the parent class loader. </p>
|
||||
*
|
||||
* <p> If there is a security manager then the class loaders created by
|
||||
* this method will load classes and resources with privileges that are
|
||||
* restricted by the calling context of this method. </p>
|
||||
*
|
||||
* @param cf
|
||||
* The configuration for the layer
|
||||
* @param parentLayers
|
||||
|
@ -586,11 +563,6 @@ public final class ModuleLayer {
|
|||
* named "{@code java}" or a package with a name starting with
|
||||
* "{@code java.}"
|
||||
*
|
||||
* @throws SecurityException
|
||||
* If {@code RuntimePermission("createClassLoader")} or
|
||||
* {@code RuntimePermission("getClassLoader")} is denied by
|
||||
* the security manager
|
||||
*
|
||||
* @see #findLoader
|
||||
*/
|
||||
public static Controller defineModulesWithManyLoaders(Configuration cf,
|
||||
|
@ -673,9 +645,6 @@ public final class ModuleLayer {
|
|||
* configuration of the parent layers, including order
|
||||
* @throws LayerInstantiationException
|
||||
* If creating the layer fails for any of the reasons listed above
|
||||
* @throws SecurityException
|
||||
* If {@code RuntimePermission("getClassLoader")} is denied by
|
||||
* the security manager
|
||||
*/
|
||||
public static Controller defineModules(Configuration cf,
|
||||
List<ModuleLayer> parentLayers,
|
||||
|
@ -906,11 +875,6 @@ public final class ModuleLayer {
|
|||
* parent} layers are searched in the manner specified by {@link
|
||||
* #findModule(String) findModule}.
|
||||
*
|
||||
* <p> If there is a security manager then its {@code checkPermission}
|
||||
* method is called with a {@code RuntimePermission("getClassLoader")}
|
||||
* permission to check that the caller is allowed to get access to the
|
||||
* class loader. </p>
|
||||
*
|
||||
* @apiNote This method does not return an {@code Optional<ClassLoader>}
|
||||
* because `null` must be used to represent the bootstrap class loader.
|
||||
*
|
||||
|
@ -921,8 +885,6 @@ public final class ModuleLayer {
|
|||
*
|
||||
* @throws IllegalArgumentException if a module of the given name is not
|
||||
* defined in this layer or any parent of this layer
|
||||
*
|
||||
* @throws SecurityException if denied by the security manager
|
||||
*/
|
||||
public ClassLoader findLoader(String name) {
|
||||
Optional<Module> om = findModule(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue