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 bt...@apache.org on 2017/08/31 01:32:26 UTC

[14/22] james-project git commit: JAMES-2127 BackendJPA: Stream instead of FluentIterable.from

JAMES-2127 BackendJPA: Stream instead of FluentIterable.from


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

Branch: refs/heads/master
Commit: cae4062e67d4998a6973256f48e4eb761343262d
Parents: 9c3bd03
Author: quynhn <qn...@linagora.com>
Authored: Fri Aug 25 16:18:44 2017 +0700
Committer: benwa <bt...@linagora.com>
Committed: Thu Aug 31 08:24:02 2017 +0700

----------------------------------------------------------------------
 .../java/org/apache/james/backends/jpa/JpaTestCluster.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/cae4062e/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java
----------------------------------------------------------------------
diff --git a/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java b/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java
index 0c5b118..19e0d86 100644
--- a/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java
+++ b/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java
@@ -21,14 +21,13 @@ package org.apache.james.backends.jpa;
 
 import java.util.HashMap;
 import java.util.List;
-
+import java.util.stream.Collectors;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 
 import org.apache.openjpa.persistence.OpenJPAPersistence;
 
 import com.google.common.base.Joiner;
-import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
 
 public class JpaTestCluster {
@@ -50,8 +49,9 @@ public class JpaTestCluster {
         properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72");
         properties.put("openjpa.MetaDataFactory", "jpa(Types=" +
             Joiner.on(";").join(
-                FluentIterable.from(clazz)
-                    .transform(Class::getName))
+                clazz.stream()
+                    .map(Class::getName)
+                    .collect(Collectors.toList()))
             + ")");
         return new JpaTestCluster(OpenJPAPersistence.getEntityManagerFactory(properties));
     }


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