From bb28a2e1fd48bbbbb273faee67532b70c83416e8 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Fri, 14 Sep 2007 20:34:42 +0000
Subject: [PATCH] Fixed a issue where removing debug/error loggers after a in-core server restart results in a NullPointerException.
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index 2aa4e1b..1f448f2 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/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(),
--
Gitblit v1.10.0