Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63FA710E76 for ; Mon, 3 Mar 2014 14:13:12 +0000 (UTC) Received: (qmail 79915 invoked by uid 500); 3 Mar 2014 14:13:11 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 79802 invoked by uid 500); 3 Mar 2014 14:13:09 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 79794 invoked by uid 99); 3 Mar 2014 14:13:08 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 14:13:08 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3FDB29338D8; Mon, 3 Mar 2014 14:13:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: Use the QName of a service as part of the cache key Date: Mon, 3 Mar 2014 14:13:08 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/2.6.x-fixes 258cd0914 -> e9fd4dae5 Use the QName of a service as part of the cache key Conflicts: rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java Conflicts: rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e9fd4dae Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e9fd4dae Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e9fd4dae Branch: refs/heads/2.6.x-fixes Commit: e9fd4dae5d6feb53fec92fee34142192320d6469 Parents: 258cd09 Author: Colm O hEigeartaigh Authored: Mon Mar 3 12:35:24 2014 +0000 Committer: Colm O hEigeartaigh Committed: Mon Mar 3 14:12:56 2014 +0000 ---------------------------------------------------------------------- .../cxf/ws/security/policy/interceptors/NegotiationUtils.java | 6 +----- .../main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/e9fd4dae/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java index 5b21159..8138a57 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java @@ -19,7 +19,6 @@ package org.apache.cxf.ws.security.policy.interceptors; -import java.math.BigInteger; import java.util.Collection; import java.util.List; @@ -66,7 +65,6 @@ import org.apache.ws.security.conversation.ConversationException; import org.apache.ws.security.handler.WSHandlerConstants; import org.apache.ws.security.handler.WSHandlerResult; import org.apache.ws.security.message.token.SecurityContextToken; -import org.apache.xml.security.utils.Base64; /** * This is a collection of utility methods for use in negotiation exchanges such as WS-SecureConversation @@ -113,9 +111,7 @@ public final class NegotiationUtils { TokenStoreFactory tokenStoreFactory = TokenStoreFactory.newInstance(); String cacheKey = SecurityConstants.TOKEN_STORE_CACHE_INSTANCE; if (info.getName() != null) { - int hashCode = info.getName().toString().hashCode(); - cacheKey += - "-" + Base64.encode(BigInteger.valueOf((long)hashCode)); + cacheKey += "-" + info.getName().toString(); } tokenStore = tokenStoreFactory.newTokenStore(cacheKey, message); info.setProperty(SecurityConstants.TOKEN_STORE_CACHE_INSTANCE, tokenStore); http://git-wip-us.apache.org/repos/asf/cxf/blob/e9fd4dae/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java index a0df930..6d7d2ea 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java @@ -18,7 +18,6 @@ */ package org.apache.cxf.ws.security.wss4j; -import java.math.BigInteger; import javax.xml.namespace.QName; import org.apache.cxf.binding.soap.SoapMessage; @@ -29,7 +28,6 @@ import org.apache.cxf.ws.security.cache.ReplayCacheFactory; import org.apache.ws.security.WSConstants; import org.apache.ws.security.WSSecurityException; import org.apache.ws.security.cache.ReplayCache; -import org.apache.xml.security.utils.Base64; /** * Some common functionality that can be shared between the WSS4JInInterceptor and the @@ -96,9 +94,7 @@ public final class WSS4JUtils { ReplayCacheFactory replayCacheFactory = ReplayCacheFactory.newInstance(); String cacheKey = instanceKey; if (info.getName() != null) { - int hashCode = info.getName().toString().hashCode(); - cacheKey += - "-" + Base64.encode(BigInteger.valueOf((long)hashCode)); + cacheKey += "-" + info.getName().toString(); } replayCache = replayCacheFactory.newReplayCache(cacheKey, message); info.setProperty(instanceKey, replayCache);