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 45DD210AE4 for ; Mon, 3 Mar 2014 12:38:19 +0000 (UTC) Received: (qmail 838 invoked by uid 500); 3 Mar 2014 12:38:17 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 696 invoked by uid 500); 3 Mar 2014 12:38:11 -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 688 invoked by uid 99); 3 Mar 2014 12:38:10 -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 12:38:10 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7B45593362F; Mon, 3 Mar 2014 12:38:10 +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: <2064bc357ce64945aa0bbb660900204c@git.apache.org> 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 12:38:10 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master c58518d61 -> a02db39a1 Use the QName of a service as part of the cache key Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a02db39a Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a02db39a Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a02db39a Branch: refs/heads/master Commit: a02db39a1102951ce59ab47b2ce39505872d2185 Parents: c58518d Author: Colm O hEigeartaigh Authored: Mon Mar 3 12:35:24 2014 +0000 Committer: Colm O hEigeartaigh Committed: Mon Mar 3 12:35:24 2014 +0000 ---------------------------------------------------------------------- .../java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/a02db39a/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 4f11167..97dc199 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 @@ -19,7 +19,6 @@ package org.apache.cxf.ws.security.wss4j; import java.io.IOException; -import java.math.BigInteger; import java.net.URL; import java.security.Key; import java.util.Date; @@ -44,7 +43,6 @@ import org.apache.wss4j.common.cache.ReplayCacheFactory; import org.apache.wss4j.stax.ext.WSSConstants; import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants; import org.apache.xml.security.exceptions.XMLSecurityException; -import org.apache.xml.security.utils.Base64; /** * Some common functionality that can be shared between the WSS4JInInterceptor and the @@ -94,9 +92,7 @@ public final class WSS4JUtils { if (replayCache == null) { String cacheKey = instanceKey; if (info.getName() != null) { - int hashCode = info.getName().toString().hashCode(); - cacheKey += - "-" + Base64.encode(BigInteger.valueOf((long)hashCode)); + cacheKey += "-" + info.getName().toString(); } URL configFile = getConfigFileURL(message); @@ -159,9 +155,7 @@ public final class WSS4JUtils { 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);