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
|
@ -159,10 +159,6 @@ import jdk.internal.vm.SharedThreadContainer;
|
|||
* If no thread factory is supplied via a system property, then the
|
||||
* common pool uses a factory that uses the system class loader as the
|
||||
* {@linkplain Thread#getContextClassLoader() thread context class loader}.
|
||||
* In addition, if a {@link SecurityManager} is present, then
|
||||
* the common pool uses a factory supplying threads that have no
|
||||
* {@link Permissions} enabled, and are not guaranteed to preserve
|
||||
* the values of {@link java.lang.ThreadLocal} variables across tasks.
|
||||
*
|
||||
* Upon any error in establishing these settings, default parameters
|
||||
* are used. It is possible to disable or limit the use of threads in
|
||||
|
@ -2849,11 +2845,6 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* other parameters (see {@link #ForkJoinPool(int,
|
||||
* ForkJoinWorkerThreadFactory, UncaughtExceptionHandler, boolean,
|
||||
* int, int, int, Predicate, long, TimeUnit)}).
|
||||
*
|
||||
* @throws SecurityException if a security manager exists and
|
||||
* the caller is not permitted to modify threads
|
||||
* because it does not hold {@link
|
||||
* java.lang.RuntimePermission}{@code ("modifyThread")}
|
||||
*/
|
||||
public ForkJoinPool() {
|
||||
this(Math.min(MAX_CAP, Runtime.getRuntime().availableProcessors()),
|
||||
|
@ -2871,10 +2862,6 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* @param parallelism the parallelism level
|
||||
* @throws IllegalArgumentException if parallelism less than or
|
||||
* equal to zero, or greater than implementation limit
|
||||
* @throws SecurityException if a security manager exists and
|
||||
* the caller is not permitted to modify threads
|
||||
* because it does not hold {@link
|
||||
* java.lang.RuntimePermission}{@code ("modifyThread")}
|
||||
*/
|
||||
public ForkJoinPool(int parallelism) {
|
||||
this(parallelism, defaultForkJoinWorkerThreadFactory, null, false,
|
||||
|
@ -2903,10 +2890,6 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* @throws IllegalArgumentException if parallelism less than or
|
||||
* equal to zero, or greater than implementation limit
|
||||
* @throws NullPointerException if the factory is null
|
||||
* @throws SecurityException if a security manager exists and
|
||||
* the caller is not permitted to modify threads
|
||||
* because it does not hold {@link
|
||||
* java.lang.RuntimePermission}{@code ("modifyThread")}
|
||||
*/
|
||||
public ForkJoinPool(int parallelism,
|
||||
ForkJoinWorkerThreadFactory factory,
|
||||
|
@ -2988,10 +2971,6 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* or if maximumPoolSize is less than parallelism,
|
||||
* of if the keepAliveTime is less than or equal to zero.
|
||||
* @throws NullPointerException if the factory is null
|
||||
* @throws SecurityException if a security manager exists and
|
||||
* the caller is not permitted to modify threads
|
||||
* because it does not hold {@link
|
||||
* java.lang.RuntimePermission}{@code ("modifyThread")}
|
||||
* @since 9
|
||||
*/
|
||||
public ForkJoinPool(int parallelism,
|
||||
|
@ -3285,10 +3264,6 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* #commonPool()} and parallelism level was set by System
|
||||
* property {@systemProperty
|
||||
* java.util.concurrent.ForkJoinPool.common.parallelism}.
|
||||
* @throws SecurityException if a security manager exists and
|
||||
* the caller is not permitted to modify threads
|
||||
* because it does not hold {@link
|
||||
* java.lang.RuntimePermission}{@code ("modifyThread")}
|
||||
* @since 19
|
||||
*/
|
||||
public int setParallelism(int size) {
|
||||
|
@ -3692,11 +3667,6 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* already shut down. Tasks that are in the process of being
|
||||
* submitted concurrently during the course of this method may or
|
||||
* may not be rejected.
|
||||
*
|
||||
* @throws SecurityException if a security manager exists and
|
||||
* the caller is not permitted to modify threads
|
||||
* because it does not hold {@link
|
||||
* java.lang.RuntimePermission}{@code ("modifyThread")}
|
||||
*/
|
||||
public void shutdown() {
|
||||
checkPermission();
|
||||
|
@ -3717,10 +3687,6 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* (unlike the case for some other Executors).
|
||||
*
|
||||
* @return an empty list
|
||||
* @throws SecurityException if a security manager exists and
|
||||
* the caller is not permitted to modify threads
|
||||
* because it does not hold {@link
|
||||
* java.lang.RuntimePermission}{@code ("modifyThread")}
|
||||
*/
|
||||
public List<Runnable> shutdownNow() {
|
||||
checkPermission();
|
||||
|
@ -3825,13 +3791,6 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* execution are not executed. The interrupt status will be
|
||||
* re-asserted before this method returns.
|
||||
*
|
||||
* @throws SecurityException if a security manager exists and
|
||||
* shutting down this ExecutorService may manipulate
|
||||
* threads that the caller is not permitted to modify
|
||||
* because it does not hold {@link
|
||||
* java.lang.RuntimePermission}{@code ("modifyThread")},
|
||||
* or the security manager's {@code checkAccess} method
|
||||
* denies access.
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue