Repository: cxf Updated Branches: refs/heads/master 5583b99e0 -> 28346081d
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/28346081 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/28346081 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/28346081 Branch: refs/heads/master Commit: 28346081d37417f7ad8994569c5c14d4cc99b647 Parents: 5583b99 Author: Sergey Beryozkin <[email protected]> Authored: Thu Dec 18 17:17:33 2014 +0000 Committer: Sergey Beryozkin <[email protected]> Committed: Thu Dec 18 17:17:33 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/28346081/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; }
