You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2019/09/26 15:57:01 UTC

[syncope] branch 2_1_X updated: [SYNCOPE-957] More robustness

This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_1_X by this push:
     new b7618de  [SYNCOPE-957] More robustness
b7618de is described below

commit b7618de03a8340f7e616758896e3caf1a94cdc11
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Thu Sep 26 17:48:26 2019 +0200

    [SYNCOPE-957] More robustness
---
 .../main/java/org/apache/syncope/common/lib/EntityTOUtils.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/EntityTOUtils.java b/common/lib/src/main/java/org/apache/syncope/common/lib/EntityTOUtils.java
index af4608e..ecac7d9 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/EntityTOUtils.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/EntityTOUtils.java
@@ -33,26 +33,28 @@ public final class EntityTOUtils {
 
     public static Map<String, AttrTO> buildAttrMap(final Collection<AttrTO> attrs) {
         return Collections.unmodifiableMap(attrs.stream().collect(Collectors.toMap(
-                AttrTO::getSchema, Function.identity())));
+                AttrTO::getSchema, Function.identity(), (exist, repl) -> repl)));
     }
 
     public static Map<Pair<String, String>, RelationshipTO> buildRelationshipMap(
             final Collection<RelationshipTO> relationships) {
 
         return Collections.unmodifiableMap(relationships.stream().collect(Collectors.toMap(
-                rel -> Pair.of(rel.getType(), rel.getOtherEndKey()), Function.identity())));
+                rel -> Pair.of(rel.getType(), rel.getOtherEndKey()), Function.identity(), (exist, repl) -> repl)));
     }
 
     public static Map<String, MembershipTO> buildMembershipMap(final Collection<MembershipTO> memberships) {
         return Collections.unmodifiableMap(memberships.stream().collect(Collectors.toMap(
-                MembershipTO::getGroupKey, Function.identity())));
+                MembershipTO::getGroupKey, Function.identity(), (exist, repl) -> repl)));
     }
 
     public static Map<Pair<String, String>, LinkedAccountTO> buildLinkedAccountMap(
             final Collection<LinkedAccountTO> accounts) {
 
         return Collections.unmodifiableMap(accounts.stream().collect(Collectors.toMap(
-                account -> Pair.of(account.getResource(), account.getConnObjectName()), Function.identity())));
+                account -> Pair.of(account.getResource(), account.getConnObjectName()),
+                Function.identity(),
+                (exist, repl) -> repl)));
     }
 
     /**