Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8320891

Remove ThreadGroup.stop

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P4
    • 23
    • core-libs
    • None
    • source, binary, behavioral
    • minimal
    • Hide
      The methods throws UOE since Java 20. It's possible there is code somewhere that "wraps" a ThreadGroup and delegates all methods. That code will no longer compile without change. Code compiled to older releases will continue to run but if the method is invoked then NoSuchMethodError will be thrown instead of UnsupportedOperationException.

      Corpus analysis of 176180458 classes in 484751 artifacts found usages in 14 artifacts.
      Show
      The methods throws UOE since Java 20. It's possible there is code somewhere that "wraps" a ThreadGroup and delegates all methods. That code will no longer compile without change. Code compiled to older releases will continue to run but if the method is invoked then NoSuchMethodError will be thrown instead of UnsupportedOperationException. Corpus analysis of 176180458 classes in 484751 artifacts found usages in 14 artifacts.
    • Java API
    • SE

    Description

      Summary

      Remove java.lang.ThreadGroup.stop.

      Problem

      This inherently unsafe method and broken mechanism dates from JDK 1.0. The method was originally deprecated in JDK 1.2 (1998), and deprecated for removal in Java 18. The method was re-specified/degraded to throw UnsupportedOperationException (UOE) in Java 20. It is time to finally remove this method from the API.

      Solution

      Remove java.lang.ThreadGroup.stop.

      This CSR does not propose to remove Thread.stop as there are still a significant number of artifacts with code (or tests) that appear to use this method. A future CSR will likely remove this method.

      Specification

      Remove java.lang.ThreadGroup.stop.

      Attachments

        Issue Links

          Activity

            People

              alanb Alan Bateman
              alanb Alan Bateman
              David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: