james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [06/24] james-project git commit: JAMES-2366 Solve IntelliJ warnings in RecipientRewriteTableProcessor
Date Tue, 03 Apr 2018 10:02:52 GMT
JAMES-2366 Solve IntelliJ warnings in RecipientRewriteTableProcessor


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

Branch: refs/heads/master
Commit: 3e5c5939ec05e555363ced499ea92041f5bb9809
Parents: 667b860
Author: benwa <btellier@linagora.com>
Authored: Wed Mar 28 13:18:14 2018 +0700
Committer: benwa <btellier@linagora.com>
Committed: Tue Apr 3 16:59:44 2018 +0700

----------------------------------------------------------------------
 .../transport/mailets/RecipientRewriteTableProcessor.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/3e5c5939/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java
index 55f6a6a..475b149 100644
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java
+++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java
@@ -102,7 +102,7 @@ public class RecipientRewriteTableProcessor {
             .collect(Guavate.toImmutableSet());
     }
 
-    private ImmutableList<RrtExecutionResult> toMappingDatas(final Mail mail) {
+    private ImmutableList<RrtExecutionResult> toMappingDatas(Mail mail) {
         Function<MailAddress, RrtExecutionResult> convertToMappingData = recipient
-> {
             Preconditions.checkNotNull(recipient);
 
@@ -171,7 +171,7 @@ public class RecipientRewriteTableProcessor {
             .collect(Guavate.toImmutableList());
         
         if (!addressWithoutDomains.isEmpty()) {
-            final Domain defaultDomain = getDefaultDomain(domainList);
+            Domain defaultDomain = getDefaultDomain(domainList);
 
             return addressWithoutDomains.stream()
                 .map(address -> address.appendDomain(defaultDomain))
@@ -180,7 +180,7 @@ public class RecipientRewriteTableProcessor {
         return ImmutableList.of();
     }
 
-    private void forwardToRemoteAddress(MailAddress sender, MailAddress recipient, MimeMessage
message, ImmutableList<MailAddress> mailAddresses) throws MessagingException {
+    private void forwardToRemoteAddress(MailAddress sender, MailAddress recipient, MimeMessage
message, ImmutableList<MailAddress> mailAddresses) {
         ImmutableList<MailAddress> remoteAddress = mailAddresses.stream()
             .filter(mailAddress -> !mailetContext.isLocalServer(mailAddress.getDomain()))
             .collect(Guavate.toImmutableList());
@@ -204,11 +204,11 @@ public class RecipientRewriteTableProcessor {
     }
     
     private RrtExecutionResult error(MailAddress mailAddress) {
-        return new RrtExecutionResult(Optional.empty(), Optional.<List<MailAddress>>of(ImmutableList.of(mailAddress)));
+        return new RrtExecutionResult(Optional.empty(), Optional.of(ImmutableList.of(mailAddress)));
     }
 
     private RrtExecutionResult origin(MailAddress mailAddress) {
-        return new RrtExecutionResult(Optional.<List<MailAddress>>of(ImmutableList.of(mailAddress)),
Optional.empty());
+        return new RrtExecutionResult(Optional.of(ImmutableList.of(mailAddress)), Optional.empty());
     }
 
     class RrtExecutionResult {


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