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 fd0edbb352c42434e3c376678cc0d73bfab09038
Author: Michele Riva <[email protected]>
AuthorDate: Fri Jul 12 12:09:25 2019 +0200

    Fixed NPE handling for newEntry.getValue
---
 .../java/org/apache/unomi/services/services/ProfileServiceImpl.java   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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 2df09bd..e612e15 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,10 +997,8 @@ 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) {
+                String packageName = 
newEntry.getValue().getClass().getPackage().getName();
                 if (newEntry.getValue() instanceof Collection) {
                     target.put(newEntry.getKey(), newEntry.getValue());
                     changed = true;

Reply via email to