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

runtime/Thread/SuspendAtExit.java needs updating

XMLWordPrintable

    • b20
    • generic
    • generic

      java.lang.Thread.suspend() and java.lang.Thread.resume()
      are deprecated for removal:

      ----------System.err:(13/1091)----------
      /System/Volumes/Data/work/shared/bug_hunt/base_for_jdk17.git/open/test/hotspot/jtreg/runtime/Thread/SuspendAtExit.java:70: warning: [removal] suspend() in Thread has been deprecated and marked for removal
                          threads[i].suspend();
                                    ^
      /System/Volumes/Data/work/shared/bug_hunt/base_for_jdk17.git/open/test/hotspot/jtreg/runtime/Thread/SuspendAtExit.java:77: warning: [removal] resume() in Thread has been deprecated and marked for removal
                          threads[i].resume();
                                    ^
      /System/Volumes/Data/work/shared/bug_hunt/base_for_jdk17.git/open/test/hotspot/jtreg/runtime/Thread/SuspendAtExit.java:96: warning: [removal] suspend() in Thread has been deprecated and marked for removal
                  threads[i].suspend();
                            ^
      /System/Volumes/Data/work/shared/bug_hunt/base_for_jdk17.git/open/test/hotspot/jtreg/runtime/Thread/SuspendAtExit.java:97: warning: [removal] resume() in Thread has been deprecated and marked for removal
                  threads[i].resume();
                            ^
      4 warnings
      result: Passed. Compilation successful

      Will be switching java.lang.Thread.suspend() to JVM/TI SuspendThread() and
      from java.lang.Thread.resume() to JVM/TI ResumeThread().

      Also, the test should be switched from a counter based test to a
      time based test since time based tests work better for stress kits.
      Will also be cleaning up the error handling since the JVM/TI APIs
      actually return error codes.

            dcubed Daniel Daugherty
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: