Hello. Please review the fix for jdk9.In the fix the call to ThreadGroup.stop() was wrapped in privileged block. The new test is provided, I have checked that it will fail if default permission "stopThread" will be removed from java.policy or if the call to ThreadGroup.stop() will be removed from AppContext.java
Bug: https://bugs.openjdk.java.net/browse/JDK-8136858 Webrev can be found at: http://cr.openjdk.java.net/~serb/8136858/webrev.02 -- Best regards, Sergey.