From cfc513043c5830b5a967733066068c7097b42e3c Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 15 Aug 2007 21:34:53 +0000
Subject: [PATCH] This commit is a step toward getting OpenDS internationalized. There are still issues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.
---
opendj-sdk/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java | 37 +++++++++++++++++++++----------------
1 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java b/opendj-sdk/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
index 57f0dbc..112b145 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
@@ -45,8 +45,7 @@
import org.opends.server.util.ExpirationCheckTrustManager;
import org.opends.server.util.SelectableCertificateKeyManager;
-import static org.opends.server.messages.ToolMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
+import static org.opends.messages.ToolMessages.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
@@ -136,8 +135,8 @@
sslSocketFactory = ctx.getSocketFactory();
} catch(Exception e)
{
- int msgID = MSGID_TOOLS_CANNOT_CREATE_SSL_CONNECTION;
- throw new SSLConnectionException(getMessage(msgID, e.getMessage()), e);
+ throw new SSLConnectionException(
+ ERR_TOOLS_CANNOT_CREATE_SSL_CONNECTION.get(e.getMessage()), e);
}
}
@@ -162,8 +161,9 @@
{
if(sslSocketFactory == null)
{
- int msgID = MSGID_TOOLS_SSL_CONNECTION_NOT_INITIALIZED;
- throw new SSLConnectionException(getMessage(msgID));
+
+ throw new SSLConnectionException(
+ ERR_TOOLS_SSL_CONNECTION_NOT_INITIALIZED.get());
}
return sslSocketFactory.createSocket(hostName, portNumber);
}
@@ -194,8 +194,9 @@
{
if(sslSocketFactory == null)
{
- int msgID = MSGID_TOOLS_SSL_CONNECTION_NOT_INITIALIZED;
- throw new SSLConnectionException(getMessage(msgID));
+
+ throw new SSLConnectionException(
+ ERR_TOOLS_SSL_CONNECTION_NOT_INITIALIZED.get());
}
return sslSocketFactory.createSocket(s, hostName, portNumber, autoClose);
}
@@ -264,8 +265,9 @@
{
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
- int msgID = MSGID_TOOLS_CANNOT_LOAD_KEYSTORE_FILE;
- throw new SSLConnectionException(getMessage(msgID, keyStoreFile), e);
+
+ throw new SSLConnectionException(
+ ERR_TOOLS_CANNOT_LOAD_KEYSTORE_FILE.get(keyStoreFile), e);
}
try
@@ -282,8 +284,9 @@
{
TRACER.debugCaught(DebugLogLevel.ERROR, ke);
}
- int msgID = MSGID_TOOLS_CANNOT_INIT_KEYMANAGER;
- throw new SSLConnectionException(getMessage(msgID, keyStoreFile), ke);
+
+ throw new SSLConnectionException(
+ ERR_TOOLS_CANNOT_INIT_KEYMANAGER.get(keyStoreFile), ke);
}
}
@@ -356,8 +359,9 @@
{
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
- int msgID = MSGID_TOOLS_CANNOT_LOAD_TRUSTSTORE_FILE;
- throw new SSLConnectionException(getMessage(msgID, trustStoreFile), e);
+
+ throw new SSLConnectionException(
+ ERR_TOOLS_CANNOT_LOAD_TRUSTSTORE_FILE.get(trustStoreFile), e);
}
try
@@ -374,8 +378,9 @@
{
TRACER.debugCaught(DebugLogLevel.ERROR, ke);
}
- int msgID = MSGID_TOOLS_CANNOT_INIT_TRUSTMANAGER;
- throw new SSLConnectionException(getMessage(msgID, trustStoreFile), ke);
+
+ throw new SSLConnectionException(
+ ERR_TOOLS_CANNOT_INIT_TRUSTMANAGER.get(trustStoreFile), ke);
}
}
--
Gitblit v1.10.0