cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: Fixing NPE
Date Fri, 01 Aug 2014 14:45:09 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/1.1.x-fixes 5ca40da0a -> 40860d311


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/40860d31
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/40860d31
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/40860d31

Branch: refs/heads/1.1.x-fixes
Commit: 40860d311fe866fcce308133c8a71271920eaad6
Parents: 5ca40da
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 15:41:20 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/40860d31/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java
----------------------------------------------------------------------
diff --git a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java
b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java
index 447cd71..21c7230 100644
--- a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java
+++ b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java
@@ -170,9 +170,10 @@ public class FederationContext 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; 
@@ -190,9 +191,10 @@ public class FederationContext 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