Mercurial > hg > icedtea7-forest > jdk
changeset 9219:8f40b239d609
8172465: Better handling of channel groups
Reviewed-by: alanb, coffeys, skoivu, rhalade, chegar
author | bpb |
---|---|
date | Fri, 14 Jul 2017 05:21:12 +0100 |
parents | f014749131f6 |
children | d4a33ff7f1dd |
files | src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java |
diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java Fri Jul 14 04:55:25 2017 +0100 +++ b/src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java Fri Jul 14 05:21:12 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, 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 @@ -37,6 +37,7 @@ import java.security.PrivilegedAction; import java.security.AccessController; import java.security.AccessControlContext; +import sun.misc.SharedSecrets; import sun.security.action.GetIntegerAction; /** @@ -246,13 +247,16 @@ abstract void shutdownHandlerTasks(); private void shutdownExecutors() { - AccessController.doPrivileged(new PrivilegedAction<Void>() { - public Void run() { - pool.executor().shutdown(); - timeoutExecutor.shutdown(); - return null; - } - }); + SharedSecrets.getJavaSecurityAccess().doPrivileged( + new PrivilegedAction<Void>() { + public Void run() { + pool.executor().shutdown(); + timeoutExecutor.shutdown(); + return null; + } + }, + null, + new RuntimePermission("modifyThread")); } @Override