From a9c66cf2e6902b49f691ae06d74ab4525509e6fa Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Fri, 19 Oct 2012 14:25:02 +0000
Subject: [PATCH] Fix OPENDJ-623: Import and rebuild should not call System.exit()
---
opends/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java | 33 ---------------------------------
1 files changed, 0 insertions(+), 33 deletions(-)
diff --git a/opends/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java b/opends/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java
index 8cc703f..b460771 100644
--- a/opends/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java
@@ -30,13 +30,11 @@
import static org.opends.messages.JebMessages.*;
import static org.opends.server.loggers.ErrorLogger.logError;
-import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.debug.DebugLogger.getTracer;
import static org.opends.server.util.DynamicConstants.BUILD_ID;
import static org.opends.server.util.DynamicConstants.REVISION_NUMBER;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.getFileForPath;
-import static org.opends.server.util.StaticUtils.stackTraceToString;
import java.io.*;
import java.nio.ByteBuffer;
@@ -2158,8 +2156,6 @@
@Override
public Void call() throws Exception
{
- Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler());
-
ByteBuffer key = null;
ImportIDSet insertIDSet = null;
ImportIDSet deleteIDSet = null;
@@ -2270,15 +2266,11 @@
Message message = ERR_JEB_IMPORT_LDIF_INDEX_WRITE_DB_ERR.get(
indexMgr.getBufferFileName(), e.getMessage());
logError(message);
- e.printStackTrace();
throw e;
}
finally
{
endWriteTask();
-
- // Clear the default exception handler.
- Thread.setDefaultUncaughtExceptionHandler(null);
}
return null;
}
@@ -5044,31 +5036,6 @@
}
}
-
- /**
- * Uncaught exception handler. Try and catch any uncaught exceptions, log
- * them and print a stack trace.
- */
- private class DefaultExceptionHandler
- implements Thread.UncaughtExceptionHandler {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void uncaughtException(Thread t, Throwable e) {
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
-
- Message message =
- ERR_JEB_IMPORT_UNCAUGHT_EXCEPTION.get(stackTraceToString(e));
- logError(message);
- System.exit(1);
- }
- }
-
/**
* {@inheritDoc}
*/
--
Gitblit v1.10.0