james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [12/15] james-project git commit: JAMES-1982 getAllMapping result was not serializable
Date Mon, 03 Apr 2017 11:10:11 GMT
JAMES-1982 getAllMapping result was not serializable

Guava ImmutableList copy solves the issue


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/e8542113
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/e8542113
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/e8542113

Branch: refs/heads/master
Commit: e854211397d22104c9dfa7c591edae47505be8f4
Parents: f1e4b34
Author: benwa <btellier@linagora.com>
Authored: Sat Apr 1 18:37:06 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Mon Apr 3 18:09:33 2017 +0700

----------------------------------------------------------------------
 .../apache/james/rrt/lib/RecipientRewriteTableManagement.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/e8542113/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java
----------------------------------------------------------------------
diff --git a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java
b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java
index e3d2b6c..879ccfb 100644
--- a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java
+++ b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableManagement.java
@@ -28,6 +28,8 @@ import org.apache.james.rrt.api.RecipientRewriteTable;
 import org.apache.james.rrt.api.RecipientRewriteTableException;
 import org.apache.james.rrt.api.RecipientRewriteTableManagementMBean;
 
+import com.google.common.collect.ImmutableMap;
+
 /**
  * Management for RecipientRewriteTables
  */
@@ -182,7 +184,7 @@ public class RecipientRewriteTableManagement extends StandardMBean implements
Re
      */
     public Map<String, Mappings> getAllMappings() throws Exception {
         try {
-            return rrt.getAllMappings();
+            return ImmutableMap.copyOf(rrt.getAllMappings());
         } catch (RecipientRewriteTableException e) {
             throw new Exception(e.getMessage());
         }


---------------------------------------------------------------------
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