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

shuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit d45d757f60cd552e2bf3afe7173bbaa26c8df2ad
Author: Michele Riva <[email protected]>
AuthorDate: Fri Jul 12 11:27:13 2019 +0200

    Fix for Jira UNOMI-238
---
 .../java/org/apache/unomi/services/services/ProfileServiceImpl.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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 0300d46..2df09bd 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
@@ -997,6 +997,9 @@ public class ProfileServiceImpl implements ProfileService, 
SynchronousBundleList
     private boolean merge(Map<String, Object> target, Map<String, Object> 
object) {
         boolean changed = false;
         for (Map.Entry<String, Object> newEntry : object.entrySet()) {
+
+            String packageName = 
newEntry.getValue().getClass().getPackage().getName();
+
             if (newEntry.getValue() != null) {
                 if (newEntry.getValue() instanceof Collection) {
                     target.put(newEntry.getKey(), newEntry.getValue());
@@ -1009,7 +1012,8 @@ public class ProfileServiceImpl implements 
ProfileService, SynchronousBundleList
                     } else {
                         changed |= merge(currentMap, (Map) 
newEntry.getValue());
                     }
-                } else if 
(newEntry.getValue().getClass().getPackage().getName().equals("java.lang")) {
+                } else if (StringUtils.equals(packageName, "java.lang")
+                        || StringUtils.equals(packageName, 
"org.apache.unomi.api")) {
                     if (newEntry.getValue() != null && 
!newEntry.getValue().equals(target.get(newEntry.getKey()))) {
                         target.put(newEntry.getKey(), newEntry.getValue());
                         changed = true;

Reply via email to