mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
14.34.2007 bb28a2e1fd48bbbbb273faee67532b70c83416e8
Fixed a issue where removing debug/error loggers after a in-core server restart results in a NullPointerException.

Fix for issue 2259
1 files modified
17 ■■■■ changed files
opends/src/server/org/opends/server/core/DirectoryServer.java 17 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -657,12 +657,6 @@
  // The schema configuration manager for the Directory Server.
  private SchemaConfigManager schemaConfigManager;
  // The debug logger that will be used during the Directory Server startup.
  private TextDebugLogPublisher startupDebugLogPublisher;
  // The error logger that will be used during the Directory Server startup.
  private TextErrorLogPublisher startupErrorLogPublisher;
  // The set of disabled privileges.
  private Set<Privilege> disabledPrivileges;
@@ -745,8 +739,6 @@
    shuttingDown             = false;
    lockdownMode             = false;
    serverErrorResultCode    = ResultCode.OTHER;
    startupDebugLogPublisher = null;
    startupErrorLogPublisher = null;
    operatingSystem = OperatingSystem.forName(System.getProperty("os.name"));
  }
@@ -1463,12 +1455,14 @@
      sendAlertNotification(this, ALERT_TYPE_SERVER_STARTED, message);
      if (startupDebugLogPublisher != null)
      for(DebugLogPublisher startupDebugLogPublisher :
          environmentConfig.getDebugLoggers())
      {
        removeDebugLogPublisher(startupDebugLogPublisher);
      }
      if (startupErrorLogPublisher != null)
      for(ErrorLogPublisher startupErrorLogPublisher :
          environmentConfig.getErrorLoggers())
      {
        removeErrorLogPublisher(startupErrorLogPublisher);
      }
@@ -9598,9 +9592,6 @@
    DirectoryServer directoryServer = DirectoryServer.getInstance();
    try
    {
      directoryServer.startupErrorLogPublisher = startupErrorLogPublisher;
      directoryServer.startupDebugLogPublisher = startupDebugLogPublisher;
      directoryServer.setEnvironmentConfig(environmentConfig);
      directoryServer.bootstrapServer();
      directoryServer.initializeConfiguration(configClass.getValue(),