code: @Override
      public final void restore() {
  
          try {
  
              if (log.isDebugEnabled()) {
                  log.debug("ToolExecutionEnvironment restore -- Starting.");
              }
  
              for (EnvironmentFacet current : extraFacets) {
                  try {
                      current.restore();
                  } catch (Exception e) {
                      throw new IllegalStateException("Could not restore() EnvironmentFacet of type ["
                              + current.getClass().getName() + "]", e);
                  }
              }
          } finally {
  
              // Restore the logging handler structure.
              loggingHandlerEnvironmentFacet.restore();
  
              // Restore the original locale
              if (localeFacet != null) {
                  localeFacet.restore();
              }
  
              if (holder != null) {
                  // Restore the original ClassLoader
                  holder.restoreClassLoaderAndReleaseThread();
              }
  
              if (log.isDebugEnabled()) {
                  log.debug("ToolExecutionEnvironment restore -- Done.");
              }
          }
      }
docs: {@inheritDoc}