james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [02/24] james-project git commit: JAMES-2366 Fix Eclipse warning
Date Tue, 03 Apr 2018 10:02:48 GMT
JAMES-2366 Fix Eclipse warning


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

Branch: refs/heads/master
Commit: 7b8f50ad23498676b74e2d54a9b54103612d96fb
Parents: 213965f
Author: Antoine Duprat <aduprat@linagora.com>
Authored: Tue Mar 27 11:50:18 2018 +0200
Committer: benwa <btellier@linagora.com>
Committed: Tue Apr 3 16:58:07 2018 +0700

----------------------------------------------------------------------
 .../james/rrt/api/RecipientRewriteTable.java    | 29 +++++++++++++-------
 .../integration/SetMessagesMethodTest.java      |  2 +-
 2 files changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/7b8f50ad/server/data/data-api/src/main/java/org/apache/james/rrt/api/RecipientRewriteTable.java
----------------------------------------------------------------------
diff --git a/server/data/data-api/src/main/java/org/apache/james/rrt/api/RecipientRewriteTable.java
b/server/data/data-api/src/main/java/org/apache/james/rrt/api/RecipientRewriteTable.java
index 8ecbe0e..b747c71 100644
--- a/server/data/data-api/src/main/java/org/apache/james/rrt/api/RecipientRewriteTable.java
+++ b/server/data/data-api/src/main/java/org/apache/james/rrt/api/RecipientRewriteTable.java
@@ -45,19 +45,28 @@ public interface RecipientRewriteTable {
     }
 
     /**
-     * The prefix which is used for error mappings
+     * 
+     * Prefixes used for:
+     *  - error mappings
+     *  - regex mappings
+     *  - alias domain mappings
+     *
      */
-    String ERROR_PREFIX = "error:";
+    public enum Prefix {
+        ERROR("error:"),
+        REGEX("regex:"),
+        ALIASDOMAIN("domain:");
 
-    /**
-     * The prefix which is used for regex mappings
-     */
-    String REGEX_PREFIX = "regex:";
+        private final String asString;
 
-    /**
-     * The prefix which is used for alias domain mappings
-     */
-    String ALIASDOMAIN_PREFIX = "domain:";
+        private Prefix(String asString) {
+            this.asString = asString;
+        }
+
+        public String asString() {
+            return asString;
+        }
+    }
 
     /**
      * The wildcard used for alias domain mappings

http://git-wip-us.apache.org/repos/asf/james-project/blob/7b8f50ad/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
index b3c52b5..d042556 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
@@ -2762,7 +2762,7 @@ public abstract class SetMessagesMethodTest {
         String password = "password";
         dataProbe.addUser(recipientAddress, password);
         mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, recipientAddress, DefaultMailboxes.INBOX);
-        AccessToken recipientToken = HttpJmapAuthentication.authenticateJamesUser(baseUri(),
recipientAddress, password);
+        HttpJmapAuthentication.authenticateJamesUser(baseUri(), recipientAddress, password);
         await();
 
         String messageCreationId = "creationId1337";


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