cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/2] git commit: Fixing NPE
Date Fri, 01 Aug 2014 13:40:19 GMT
Fixing NPE


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

Branch: refs/heads/master
Commit: e17038b5330bc4db66214bf59e5315d7efdeebde
Parents: 3f8504b
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Aug 1 14:40:09 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Aug 1 14:40:09 2014 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/fediz/core/config/FedizContext.java    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e17038b5/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java
----------------------------------------------------------------------
diff --git a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java
b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java
index dc8b1ed..5212793 100644
--- a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java
+++ b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizContext.java
@@ -182,9 +182,10 @@ public class FedizContext implements Closeable {
             crypto = CryptoFactory.getInstance(sigProperties);
             keyManager.setCrypto(crypto);
         } catch (WSSecurityException e) {
+            String name = keyManager.getName();
             keyManager = null;
-            LOG.error("Failed to load keystore '" + keyManager.getName() + "'", e);
-            throw new IllegalConfigurationException("Failed to load keystore '" + keyManager.getName()
+ "'");
+            LOG.error("Failed to load keystore '" + name + "'", e);
+            throw new IllegalConfigurationException("Failed to load keystore '" + name +
"'");
         }
         
         return keyManager; 
@@ -202,9 +203,10 @@ public class FedizContext implements Closeable {
             crypto = CryptoFactory.getInstance(decProperties);
             decryptionKeyManager.setCrypto(crypto);
         } catch (WSSecurityException e) {
+            String name = decryptionKeyManager.getName();
             decryptionKeyManager = null;
-            LOG.error("Failed to load keystore '" + decryptionKeyManager.getName() + "'",
e);
-            throw new IllegalConfigurationException("Failed to load keystore '" + decryptionKeyManager.getName()
+ "'");
+            LOG.error("Failed to load keystore '" + name + "'", e);
+            throw new IllegalConfigurationException("Failed to load keystore '" + name +
"'");
         }
         
         return decryptionKeyManager; 


Mime
View raw message