cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fixing a bug exposed by Exchange now being ConcurrentHashMap
Date Thu, 18 Dec 2014 17:19:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 2c4880230 -> 45a9a47a9


Fixing a bug exposed by Exchange now being ConcurrentHashMap


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

Branch: refs/heads/3.0.x-fixes
Commit: 45a9a47a9a064813c845dfa74d904936d2698f0a
Parents: 2c48802
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Dec 18 17:17:33 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Dec 18 17:18:46 2014 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/45a9a47a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
index cbdaa99..8d1f107 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
@@ -206,10 +206,13 @@ public final class JwkUtils {
     }
     public static JsonWebKeys loadJwkSet(Message m, Properties props, PrivateKeyPasswordProvider
cb, 
                                          JwkReaderWriter reader) {
-        JsonWebKeys jwkSet = (JsonWebKeys)m.getExchange().get(props.get(KeyManagementUtils.RSSEC_KEY_STORE_FILE));
+        String key = (String)props.get(KeyManagementUtils.RSSEC_KEY_STORE_FILE);
+        JsonWebKeys jwkSet = key != null ? (JsonWebKeys)m.getExchange().get(key) : null;
         if (jwkSet == null) {
             jwkSet = loadJwkSet(props, m.getExchange().getBus(), cb, reader);
-            m.getExchange().put((String)props.get(KeyManagementUtils.RSSEC_KEY_STORE_FILE),
jwkSet);
+            if (key != null) {
+                m.getExchange().put(key, jwkSet);
+            }
         }
         return jwkSet;
     }


Mime
View raw message