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 2017/01/09 16:34:28 UTC

[2/2] syncope git commit: Better handling of null Vs empty, in value comparison for reconcilation reportlet

Better handling of null Vs empty, in value comparison for reconcilation reportlet


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

Branch: refs/heads/master
Commit: bbbd945f8a8bd9c9474c8d423ab7f6120697431d
Parents: c26d870
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Jan 9 17:33:57 2017 +0100
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Jan 9 17:34:08 2017 +0100

----------------------------------------------------------------------
 .../syncope/core/logic/report/ReconciliationReportlet.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/bbbd945f/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReconciliationReportlet.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReconciliationReportlet.java b/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReconciliationReportlet.java
index 9490c32..2d5c1c9 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReconciliationReportlet.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/report/ReconciliationReportlet.java
@@ -28,6 +28,7 @@ import java.util.Set;
 import org.apache.commons.collections4.Closure;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.IterableUtils;
+import org.apache.commons.collections4.SetUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.common.lib.SyncopeConstants;
@@ -331,7 +332,10 @@ public class ReconciliationReportlet extends AbstractReportlet {
 
                         for (Map.Entry<String, Set<Object>> entry : resourceAttrs.entrySet()) {
                             if (syncopeAttrs.containsKey(entry.getKey())) {
-                                if (!Objects.equals(syncopeAttrs.get(entry.getKey()), entry.getValue())) {
+                                if (!Objects.equals(
+                                        SetUtils.emptyIfNull(syncopeAttrs.get(entry.getKey())),
+                                        SetUtils.emptyIfNull(entry.getValue()))) {
+
                                     misaligned.add(new Misaligned(
                                             resource.getKey(),
                                             connObjectKeyValue,