From 9ff775c3cb78c7cc6c51027b1d9d7cf2ff448f98 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 30 Apr 2007 13:10:57 +0000
Subject: [PATCH] Refactor some code:
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/webstart/WebStartDownloader.java | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/webstart/WebStartDownloader.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/webstart/WebStartDownloader.java
index 80eb824..a8c0cf0 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/webstart/WebStartDownloader.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/webstart/WebStartDownloader.java
@@ -37,7 +37,7 @@
import javax.jnlp.UnavailableServiceException;
import org.opends.quicksetup.i18n.ResourceProvider;
-import org.opends.quicksetup.QuickSetupException;
+import org.opends.quicksetup.ApplicationException;
import org.opends.quicksetup.util.Utils;
/**
@@ -52,7 +52,7 @@
*/
public class WebStartDownloader implements DownloadServiceListener,
JnlpProperties {
- private QuickSetupException ex;
+ private ApplicationException ex;
private boolean isFinished;
@@ -121,12 +121,12 @@
{
// This is a bug
ex =
- new QuickSetupException(QuickSetupException.Type.BUG,
+ new ApplicationException(ApplicationException.Type.BUG,
getExceptionMsg(
"bug-msg", mfe), mfe);
} catch (IOException ioe)
{
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
String[] jars = getJarUrls();
for (int i = 0; i < jars.length; i++)
{
@@ -139,13 +139,13 @@
String[] arg =
{ buf.toString() };
ex =
- new QuickSetupException(QuickSetupException.Type.DOWNLOAD_ERROR,
+ new ApplicationException(ApplicationException.Type.DOWNLOAD_ERROR,
getExceptionMsg("downloading-error", arg, ioe), ioe);
} catch (Throwable t)
{
// This is a bug
ex =
- new QuickSetupException(QuickSetupException.Type.BUG,
+ new ApplicationException(ApplicationException.Type.BUG,
getExceptionMsg(
"bug-msg", t), t);
}
@@ -334,12 +334,12 @@
}
/**
- * Returns the QuickSetupException that has occurred during the download or
+ * Returns the ApplicationException that has occurred during the download or
* <CODE>null</CODE> if no exception occurred.
- * @return the QuickSetupException that has occurred during the download or
+ * @return the ApplicationException that has occurred during the download or
* <CODE>null</CODE> if no exception occurred.
*/
- public QuickSetupException getException()
+ public ApplicationException getException()
{
return ex;
}
@@ -350,9 +350,8 @@
public void downloadFailed(URL url, String version)
{
ex =
- new QuickSetupException(QuickSetupException.Type.DOWNLOAD_ERROR, getMsg(
- "downloading-error", new String[]
- { url.toString() }), null);
+ new ApplicationException(ApplicationException.Type.DOWNLOAD_ERROR,
+ getMsg("downloading-error", new String[] { url.toString() }), null);
}
/**
--
Gitblit v1.10.0