hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [21/34] hadoop git commit: HADOOP-12895. SSLFactory#createSSLSocketFactory exception message is wrong. Contributed by Wei-Chiu Chuang.
Date Wed, 09 Mar 2016 17:45:21 GMT
HADOOP-12895. SSLFactory#createSSLSocketFactory exception message is wrong. Contributed by
Wei-Chiu Chuang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a3cc6e25
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a3cc6e25
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a3cc6e25

Branch: refs/heads/HDFS-1312
Commit: a3cc6e2511e096ea9a54f500b59257866a1df66b
Parents: 3c33158
Author: Andrew Wang <wang@apache.org>
Authored: Tue Mar 8 13:51:20 2016 -0800
Committer: Andrew Wang <wang@apache.org>
Committed: Tue Mar 8 13:51:48 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/security/ssl/SSLFactory.java     | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a3cc6e25/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java
index 518de80..ea65848 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java
@@ -212,7 +212,8 @@ public class SSLFactory implements ConnectionConfigurator {
   public SSLServerSocketFactory createSSLServerSocketFactory()
     throws GeneralSecurityException, IOException {
     if (mode != Mode.SERVER) {
-      throw new IllegalStateException("Factory is in CLIENT mode");
+      throw new IllegalStateException(
+          "Factory is not in SERVER mode. Actual mode is " + mode.toString());
     }
     return context.getServerSocketFactory();
   }
@@ -229,7 +230,8 @@ public class SSLFactory implements ConnectionConfigurator {
   public SSLSocketFactory createSSLSocketFactory()
     throws GeneralSecurityException, IOException {
     if (mode != Mode.CLIENT) {
-      throw new IllegalStateException("Factory is in CLIENT mode");
+      throw new IllegalStateException(
+          "Factory is not in CLIENT mode. Actual mode is " + mode.toString());
     }
     return context.getSocketFactory();
   }
@@ -241,7 +243,8 @@ public class SSLFactory implements ConnectionConfigurator {
    */
   public HostnameVerifier getHostnameVerifier() {
     if (mode != Mode.CLIENT) {
-      throw new IllegalStateException("Factory is in CLIENT mode");
+      throw new IllegalStateException(
+          "Factory is not in CLIENT mode. Actual mode is " + mode.toString());
     }
     return hostnameVerifier;
   }


Mime
View raw message