JDK-8175299 : Release Note: Removed stopThread RuntimePermission from the default java.policy
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2017-02-21
  • Updated: 2017-09-22
  • Resolved: 2017-02-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Description
The default `java.policy` no longer grants `stopThread` runtime permission in JDK 9.

In previous releases, untrusted code had the `stopThread` runtime permission by default. This allows untrusted code to call `Thread::stop` ( on threads other than the current one ). Having an arbitrary exception thrown asynchronously is not something that trusted code should be expected to handle gracefully. So this permission is removed by default in JDK 9. The following line is deleted from the file `conf/security/java.policy` : `permission java.lang.RuntimePermission "stopThread";`