cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dval...@apache.org
Subject svn commit: r966853 - /cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/DefaultMessageIdCache.java
Date Thu, 22 Jul 2010 20:44:25 GMT
Author: dvaleri
Date: Thu Jul 22 20:44:25 2010
New Revision: 966853

URL: http://svn.apache.org/viewvc?rev=966853&view=rev
Log:
[CXF-2906] Removed accidentally introduced Mina dependency.

Modified:
    cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/DefaultMessageIdCache.java

Modified: cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/DefaultMessageIdCache.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/DefaultMessageIdCache.java?rev=966853&r1=966852&r2=966853&view=diff
==============================================================================
--- cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/DefaultMessageIdCache.java
(original)
+++ cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/DefaultMessageIdCache.java
Thu Jul 22 20:44:25 2010
@@ -18,9 +18,9 @@
  */
 package org.apache.cxf.ws.addressing;
 
+import java.util.Map;
 import java.util.Set;
-
-import org.apache.mina.util.ConcurrentHashSet;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * An implementation that uses a simple set to store received message IDs.
@@ -32,13 +32,14 @@ public class DefaultMessageIdCache imple
     /**
      * The set of message IDs.
      */
-    private final Set<String> messageIdSet = new ConcurrentHashSet<String>();
 
+    private final Map<String, Boolean> messageIdSet = 
+        new ConcurrentHashMap<String, Boolean>();  
     
     public boolean checkUniquenessAndCacheId(String messageId) {
-        return this.messageIdSet.add(messageId);
+        return this.messageIdSet.put(messageId, Boolean.TRUE) == null;
     }
     
     protected Set<String> getMessageIdSet() {
-        return this.messageIdSet;
+        return this.messageIdSet.keySet();
     }
 }



Mime
View raw message