docs: @SuppressWarnings({"deprecation", "WeakerAccess"})
    protected void removeShutdownHook(ClassLoaderLeakPreventor preventor, Thread shutdownHook) {
      final String displayString = "'" + shutdownHook + "' of type " + shutdownHook.getClass().getName();
      preventor.error("Removing shutdown hook: " + displayString);
      Runtime.getRuntime().removeShutdownHook(shutdownHook);
  
      if(executeShutdownHooks) { // Shutdown hooks should be executed
        
        preventor.info("Executing shutdown hook now: " + displayString);
        // Make sure it's from protected ClassLoader
        shutdownHook.start(); // Run cleanup immediately
        
        if(shutdownHookWaitMs > 0) { // Wait for shutdown hook to finish
          try {
            shutdownHook.join(shutdownHookWaitMs); // Wait for thread to run
          }
          catch (InterruptedException e) {
            // Do nothing
          }
          if(shutdownHook.isAlive()) {
            preventor.warn(shutdownHook + "still running after " + shutdownHookWaitMs + " ms - Stopping!");
            shutdownHook.stop();
          }
        }
      }
    }