code: public void restoreSystemEnvironment() {
          if (systemProperties == null)
              throw new NullPointerException("Must call SecurityDomain.setDomainEnvironment() first to record existing System environment");
          if (System.getProperty(SET_DOMAIN_ENVIRONMENT) != null) {
              logger.debug("Swapping back to original System environment properties values");
              for (int i = 0; i < ENVNAMES.length; i++) {
                  setOrClearSystemProperties(ENVNAMES[i], systemProperties);
              }
          }
      }
docs: Restores the System environment to what it was before
  <br>Also see {@link #setDomainEnvironment()}