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

Threads::destroy_vm only ever returns true

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 17
    • hotspot
    • b19

      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;
        }

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

              Created:
              Updated:
              Resolved: