mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -89,22 +89,15 @@ public class NamingManager {
|
|||
* setObjectFactoryBuilder() overrides this default policy by installing
|
||||
* an ObjectFactoryBuilder. Subsequent object factories will
|
||||
* be loaded and created using the installed builder.
|
||||
*<p>
|
||||
* The builder can only be installed if the executing thread is allowed
|
||||
* (by the security manager's checkSetFactory() method) to do so.
|
||||
* Once installed, the builder cannot be replaced.
|
||||
*
|
||||
* @param builder The factory builder to install. If null, no builder
|
||||
* is installed.
|
||||
* @throws SecurityException builder cannot be installed
|
||||
* for security reasons.
|
||||
* @throws NamingException builder cannot be installed for
|
||||
* a non-security-related reason.
|
||||
* @throws IllegalStateException If a factory has already been installed.
|
||||
* @see #getObjectInstance
|
||||
* @see ObjectFactory
|
||||
* @see ObjectFactoryBuilder
|
||||
* @see java.lang.SecurityManager#checkSetFactory
|
||||
*/
|
||||
public static void setObjectFactoryBuilder(
|
||||
ObjectFactoryBuilder builder) throws NamingException {
|
||||
|
@ -561,19 +554,12 @@ public class NamingManager {
|
|||
/**
|
||||
* Sets the InitialContextFactory builder to be builder.
|
||||
*
|
||||
*<p>
|
||||
* The builder can only be installed if the executing thread is allowed by
|
||||
* the security manager to do so. Once installed, the builder cannot
|
||||
* be replaced.
|
||||
* @param builder The initial context factory builder to install. If null,
|
||||
* no builder is set.
|
||||
* @throws SecurityException builder cannot be installed for security
|
||||
* reasons.
|
||||
* @throws NamingException builder cannot be installed for
|
||||
* a non-security-related reason.
|
||||
* @throws IllegalStateException If a builder was previous installed.
|
||||
* @see #hasInitialContextFactoryBuilder
|
||||
* @see java.lang.SecurityManager#checkSetFactory
|
||||
*/
|
||||
public static synchronized void setInitialContextFactoryBuilder(
|
||||
InitialContextFactoryBuilder builder)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue