You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ad...@apache.org on 2017/07/10 17:54:35 UTC

[23/41] james-project git commit: JAMES-2082 Solve a compilation issue with maven 3.5.0

JAMES-2082 Solve a compilation issue with maven 3.5.0


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

Branch: refs/heads/master
Commit: 59c673a565db6125821d8e06a992810b9b2def2c
Parents: 49cdfb5
Author: benwa <bt...@linagora.com>
Authored: Fri Jul 7 10:53:06 2017 +0700
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Mon Jul 10 14:23:57 2017 +0200

----------------------------------------------------------------------
 .../mailbox/cassandra/mail/migration/V1ToV2Migration.java      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/59c673a5/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java
index 73e1562..8b38faf 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java
@@ -39,6 +39,7 @@ import org.apache.james.mailbox.cassandra.mail.MessageWithoutAttachment;
 import org.apache.james.mailbox.cassandra.mail.utils.Limit;
 import org.apache.james.mailbox.store.mail.MessageMapper;
 
+import com.github.fge.lambdas.Throwing;
 import com.google.common.collect.EvictingQueue;
 import com.google.common.collect.ImmutableList;
 
@@ -75,8 +76,9 @@ public class V1ToV2Migration {
         }
 
         return messageDAOV1.retrieveMessages(ImmutableList.of(result.getMetadata()), MessageMapper.FetchType.Full, Limit.unlimited())
-            .thenApply(results -> results.findAny()
-                .orElseThrow(() -> new IllegalArgumentException("Message not found in DAO V1" + result.getMetadata())))
+            .thenApply(
+                Throwing.function(results -> results.findAny()
+                    .orElseThrow(() -> new IllegalArgumentException("Message not found in DAO V1" + result.getMetadata()))))
             .thenApply(this::submitMigration);
     }
 


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