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

AppContext.dispose uses obsolete ThreadGroup.stop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • repo-loom
    • repo-loom
    • client-libs

      ThreadGroup.stop is terminally degraded in the main line and degraded to throw UOE in the loom repo. This impacts AppContext.dispose which seems to use ThreadGroup::stop to "stop" all remaining threads in the group. This impacts a number of tests with exceptions like the following:

      java.lang.UnsupportedOperationException
      at java.base/java.lang.ThreadGroup.stop(ThreadGroup.java:533)
      at java.desktop/sun.awt.AppContext.lambda$dispose$0(AppContext.java:504)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
      at java.desktop/sun.awt.AppContext.dispose(AppContext.java:503)
      at bug6190373.main(bug6190373.java:66)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:97)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:1502)

      Tests that fail due to this are:

      java/awt/AppContext/ApplicationThreadsStop/ApplicationThreadsStop.java
      sun/awt/AppContext/8012933/Test8012933.java
      javax/swing/system/6799345/TestShutdown.java
      javax/swing/plaf/metal/MetalUtils/bug6190373.java

            alanb Alan Bateman
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: