syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [02/10] syncope git commit: White noise
Date Fri, 06 Jul 2018 13:32:04 GMT
White noise


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/2dd80d4e
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2dd80d4e
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2dd80d4e

Branch: refs/heads/master
Commit: 2dd80d4e78944f8f57841fec34069b69492ea4d9
Parents: d852fca
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Jul 6 14:23:11 2018 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Jul 6 14:23:11 2018 +0200

----------------------------------------------------------------------
 .../java/data/ResourceDataBinderImpl.java         | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/2dd80d4e/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java
index de0c9ac..b5a1ce9 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java
@@ -234,11 +234,11 @@ public class ResourceDataBinderImpl implements ResourceDataBinder {
 
                         AnyTypeClass anyTypeClass = itor.next();
                         allowedSchemas.getPlainSchemas().addAll(anyTypeClass.getPlainSchemas().stream().
-                                map(s -> s.getKey()).collect(Collectors.toList()));
+                                map(Entity::getKey).collect(Collectors.toList()));
                         allowedSchemas.getDerSchemas().addAll(anyTypeClass.getDerSchemas().stream().
-                                map(s -> s.getKey()).collect(Collectors.toList()));
+                                map(Entity::getKey).collect(Collectors.toList()));
                         allowedSchemas.getVirSchemas().addAll(anyTypeClass.getVirSchemas().stream().
-                                map(s -> s.getKey()).collect(Collectors.toList()));
+                                map(Entity::getKey).collect(Collectors.toList()));
                     }
 
                     populateMapping(
@@ -589,9 +589,8 @@ public class ResourceDataBinderImpl implements ResourceDataBinder {
                 containerTO.add(itemTO);
             }
 
-            item.getTransformers().forEach(transformer -> {
-                itemTO.getTransformers().add(transformer.getKey());
-            });
+            itemTO.getTransformers().addAll(item.getTransformers().stream().
+                    map(Entity::getKey).collect(Collectors.toSet()));
         });
     }
 
@@ -609,13 +608,13 @@ public class ResourceDataBinderImpl implements ResourceDataBinder {
         resourceTO.setConnectorDisplayName(connector == null ? null : connector.getDisplayName());
 
         // set the provision information
-        resource.getProvisions().stream().map(provision -> {
+        resource.getProvisions().forEach(provision -> {
             ProvisionTO provisionTO = new ProvisionTO();
             provisionTO.setKey(provision.getKey());
             provisionTO.setAnyType(provision.getAnyType().getKey());
             provisionTO.setObjectClass(provision.getObjectClass().getObjectClassValue());
             provisionTO.getAuxClasses().addAll(provision.getAuxClasses().stream().
-                    map(cls -> cls.getKey()).collect(Collectors.toList()));
+                    map(Entity::getKey).collect(Collectors.toList()));
             provisionTO.setSyncToken(provision.getSerializedSyncToken());
             provisionTO.setIgnoreCaseMatch(provision.isIgnoreCaseMatch());
             if (provision.getUidOnCreate() != null) {
@@ -640,8 +639,7 @@ public class ResourceDataBinderImpl implements ResourceDataBinder {
 
                 provisionTO.getMapping().getLinkingItems().add(itemTO);
             });
-            return provisionTO;
-        }).forEachOrdered(provisionTO -> {
+
             resourceTO.getProvisions().add(provisionTO);
         });
 


Mime
View raw message