docs: private synchronized VirtualMachine getAttachedVirtualMachine() throws VirtualMachineException {
          if (PID == null) {
              // Java Attach requires a PID.
              return null;
          }
  
          if (vm == null) {
              vm = createVirtualMachine();
          }
          return vm.isAttached() ? vm : null;
      }