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

Threads::destroy_vm only ever returns true

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: