# HG changeset patch # User bpb # Date 1500006072 -3600 # Node ID 8f40b239d60932822634613767515dcf69146819 # Parent f014749131f69b033d4a61007c3d8f263486485a 8172465: Better handling of channel groups Reviewed-by: alanb, coffeys, skoivu, rhalade, chegar diff -r f014749131f6 -r 8f40b239d609 src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java --- 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() { - public Void run() { - pool.executor().shutdown(); - timeoutExecutor.shutdown(); - return null; - } - }); + SharedSecrets.getJavaSecurityAccess().doPrivileged( + new PrivilegedAction() { + public Void run() { + pool.executor().shutdown(); + timeoutExecutor.shutdown(); + return null; + } + }, + null, + new RuntimePermission("modifyThread")); } @Override