From cad1fc5354b6214f1858b66a4fc31a66747a1d42 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 28 Jun 2007 14:34:07 +0000
Subject: [PATCH] Fix for issue 1815. Test the class of the Throwable we get in the backgroundTaskCompleted method. Use directly the File objects we get from the Installation class and add some debug lines to help tracking down issues in the future.
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java
index d8777f4..176654e 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java
@@ -38,6 +38,7 @@
import java.io.*;
import java.util.*;
+import java.util.logging.Level;
import java.util.logging.Logger;
import java.awt.event.WindowEvent;
@@ -268,6 +269,7 @@
catch (UserDataException uude) {
throw uude;
} catch (Throwable t) {
+ LOG.log(Level.WARNING, "Error processing task: "+t, t);
throw new UserDataException(cStep,
getThrowableMsg("bug-msg", t));
}
@@ -279,8 +281,17 @@
Throwable throwable) {
qs.getDialog().workerFinished();
if (throwable != null) {
- qs.displayError(throwable.getLocalizedMessage(),
+ if (throwable instanceof UserDataException)
+ {
+ qs.displayError(throwable.getLocalizedMessage(),
getMsg("error-title"));
+ }
+ else
+ {
+ LOG.log(Level.WARNING, "Error processing task: "+throwable,
+ throwable);
+ qs.displayError(throwable.toString(), getMsg("error-title"));
+ }
} else {
boolean serverRunning = (Boolean) returnValue;
if (!serverRunning) {
@@ -903,14 +914,14 @@
};
Installation installation = getInstallation();
- String[] parentFiles = {
- Utils.getPath(installation.getLibrariesDirectory()),
- Utils.getPath(installation.getBinariesDirectory()),
- Utils.getPath(installation.getDatabasesDirectory()),
- Utils.getPath(installation.getLogsDirectory()),
- Utils.getPath(installation.getConfigurationDirectory()),
- Utils.getPath(installation.getBackupDirectory()),
- Utils.getPath(installation.getLdifDirectory())
+ File[] parentFiles = {
+ installation.getLibrariesDirectory(),
+ installation.getBinariesDirectory(),
+ installation.getDatabasesDirectory(),
+ installation.getLogsDirectory(),
+ installation.getConfigurationDirectory(),
+ installation.getBackupDirectory(),
+ installation.getLdifDirectory()
};
boolean accept =
@@ -925,9 +936,10 @@
for (int i = 0; i < uData.length && accept; i++) {
accept &= uData[i] ||
- !equalsOrDescendant(file, new File(parentFiles[i]));
+ !equalsOrDescendant(file, parentFiles[i]);
}
+ LOG.log(Level.INFO, "accept for :"+file+" is: "+accept);
return accept;
}
}
--
Gitblit v1.10.0