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

Threads::destroy_vm only ever returns true

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b19

      Description

      bool Threads::destroy_vm() {
      ... // no return statements
        return true;
      }

      This should be cleaned up, so the callsite doesn't try to handle the false case:

      jni.cpp:

        if (Threads::destroy_vm()) {
          // Should not change thread state, VM is gone
          vm_created = 0;
          res = JNI_OK;
          return res;
        } else {
          ThreadStateTransition::transition(thread, _thread_in_vm, _thread_in_native);
          res = JNI_ERR;
          return res;
        }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: