james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matth...@apache.org
Subject svn commit: r1711981 - in /james/project/trunk/server/data: data-api/src/main/java/org/apache/james/rrt/lib/ data-hbase/src/main/java/org/apache/james/rrt/hbase/ data-library/src/main/java/org/apache/james/rrt/lib/
Date Mon, 02 Nov 2015 13:45:39 GMT
Author: matthieu
Date: Mon Nov  2 13:45:39 2015
New Revision: 1711981

URL: http://svn.apache.org/viewvc?rev=1711981&view=rev
Log:
JAMES-1595 Mappings internal list is now immutable and not published anymore

Modified:
    james/project/trunk/server/data/data-api/src/main/java/org/apache/james/rrt/lib/Mappings.java
    james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java
    james/project/trunk/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java

Modified: james/project/trunk/server/data/data-api/src/main/java/org/apache/james/rrt/lib/Mappings.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-api/src/main/java/org/apache/james/rrt/lib/Mappings.java?rev=1711981&r1=1711980&r2=1711981&view=diff
==============================================================================
--- james/project/trunk/server/data/data-api/src/main/java/org/apache/james/rrt/lib/Mappings.java
(original)
+++ james/project/trunk/server/data/data-api/src/main/java/org/apache/james/rrt/lib/Mappings.java
Mon Nov  2 13:45:39 2015
@@ -20,12 +20,9 @@
 
 package org.apache.james.rrt.lib;
 
-import java.util.Collection;
 
 public interface Mappings extends Iterable<String> {
 
-    Collection<String> getMappings();
-    
     boolean contains(String mapping);
 
     int size();

Modified: james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java?rev=1711981&r1=1711980&r2=1711981&view=diff
==============================================================================
--- james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java
(original)
+++ james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java
Mon Nov  2 13:45:39 2015
@@ -65,7 +65,7 @@ public class HBaseRecipientRewriteTable
         Mappings map = getUserDomainMappings(fixedUser, fixedDomain);
         if (map != null && map.size() != 0) {
             Mappings updatedMappings = MappingsImpl.from(map).add(mapping).build();
-            doUpdateMapping(fixedUser, fixedDomain, RecipientRewriteTableUtil.CollectionToMapping(updatedMappings.getMappings()));
+            doUpdateMapping(fixedUser, fixedDomain, RecipientRewriteTableUtil.CollectionToMapping(updatedMappings));
         } else {
             doAddMapping(fixedUser, fixedDomain, mapping);
         }

Modified: james/project/trunk/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java?rev=1711981&r1=1711980&r2=1711981&view=diff
==============================================================================
--- james/project/trunk/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java
(original)
+++ james/project/trunk/server/data/data-library/src/main/java/org/apache/james/rrt/lib/MappingsImpl.java
Mon Nov  2 13:45:39 2015
@@ -86,10 +86,10 @@ public class MappingsImpl implements Map
         
     }
     
-    private final Collection<String> mappings;
+    private final ImmutableList<String> mappings;
 
     private MappingsImpl(Collection<String> mappings) {
-        this.mappings = mappings;
+        this.mappings = ImmutableList.copyOf(mappings);
     }
     
     @Override
@@ -98,12 +98,6 @@ public class MappingsImpl implements Map
     }
 
     @Override
-    public Collection<String> getMappings() {
-        return mappings;
-    }
-    
-
-    @Override
     public boolean contains(String mapping) {
         return mappings.contains(mapping);
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message