UNOMI-59 : Handle update of multivalued property
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b8cf1c6d Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b8cf1c6d Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b8cf1c6d Branch: refs/heads/UNOMI-28-ES-2-X-UPGRADE Commit: b8cf1c6d47ad908d0413e23ee2e6551159533fd9 Parents: ac31af9 Author: Abdelkader Midani <[email protected]> Authored: Fri Sep 30 18:15:43 2016 +0200 Committer: Abdelkader Midani <[email protected]> Committed: Mon Oct 24 16:19:29 2016 +0200 ---------------------------------------------------------------------- .../java/org/apache/unomi/services/services/ProfileServiceImpl.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b8cf1c6d/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java ---------------------------------------------------------------------- diff --git a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java index 71fe2fd..9194d16 100644 --- a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java @@ -774,6 +774,7 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList Collection currentCollection = (Collection) target.get(newEntry.getKey()); if (currentCollection != null) { if (!currentCollection.containsAll((Collection) newEntry.getValue())) { + currentCollection.clear(); changed |= currentCollection.addAll((Collection) newEntry.getValue()); } } else {
