polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [11/13] zest-java git commit: rest: remove Iterables usage
Date Thu, 08 Dec 2016 23:44:20 GMT
rest: remove Iterables usage


Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/df8636b7
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/df8636b7
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/df8636b7

Branch: refs/heads/develop
Commit: df8636b7f8cfb62db5d6ea4aa218d55d2eb8f09b
Parents: ff0f3be
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Fri Dec 9 00:18:44 2016 +0100
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Fri Dec 9 00:21:14 2016 +0100

----------------------------------------------------------------------
 .../server/restlet/freemarker/ValueCompositeTemplateModel.java  | 1 -
 .../java/org/apache/zest/library/rest/admin/EntityResource.java | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/df8636b7/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java
b/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java
index 7a2b597..c9ce47f 100644
--- a/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java
+++ b/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java
@@ -32,7 +32,6 @@ import org.apache.zest.api.ZestAPI;
 import org.apache.zest.api.property.Property;
 import org.apache.zest.api.value.ValueComposite;
 import org.apache.zest.api.value.ValueDescriptor;
-import org.apache.zest.functional.Iterables;
 
 /**
  * TODO

http://git-wip-us.apache.org/repos/asf/zest-java/blob/df8636b7/libraries/rest/src/main/java/org/apache/zest/library/rest/admin/EntityResource.java
----------------------------------------------------------------------
diff --git a/libraries/rest/src/main/java/org/apache/zest/library/rest/admin/EntityResource.java
b/libraries/rest/src/main/java/org/apache/zest/library/rest/admin/EntityResource.java
index bd6d5e0..aae0384 100644
--- a/libraries/rest/src/main/java/org/apache/zest/library/rest/admin/EntityResource.java
+++ b/libraries/rest/src/main/java/org/apache/zest/library/rest/admin/EntityResource.java
@@ -30,6 +30,7 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
+import java.util.stream.StreamSupport;
 import org.apache.zest.api.entity.EntityDescriptor;
 import org.apache.zest.api.entity.EntityReference;
 import org.apache.zest.api.identity.Identity;
@@ -43,7 +44,6 @@ import org.apache.zest.api.usecase.Usecase;
 import org.apache.zest.api.usecase.UsecaseBuilder;
 import org.apache.zest.api.value.ValueSerialization;
 import org.apache.zest.api.value.ValueSerializationException;
-import org.apache.zest.functional.Iterables;
 import org.apache.zest.library.rdf.entity.EntityStateSerializer;
 import org.apache.zest.library.rdf.serializer.RdfXmlSerializer;
 import org.apache.zest.spi.entity.EntityState;
@@ -492,8 +492,7 @@ public class EntityResource
                         }
 
                         // Remove "left-overs"
-                        Iterables.toList( namedAssociation )
-                            .stream()
+                        StreamSupport.stream( namedAssociation.spliterator(), false )
                             .filter( assocName -> !names.contains( assocName ) )
                             .forEach( namedAssociation::remove );
                     }


Mime
View raw message