jkevan commented on code in PR #441:
URL: https://github.com/apache/unomi/pull/441#discussion_r901362674


##########
plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SendEventAction.java:
##########
@@ -36,18 +37,19 @@ public void setEventService(EventService eventService) {
     @Override
     public int execute(Action action, Event event) {
         String eventType = (String) 
action.getParameterValues().get("eventType");
+        Boolean toBePersisted = (Boolean) 
action.getParameterValues().get("toBePersisted");
+
         @SuppressWarnings("unchecked")
         Map<String, Object> eventProperties = (Map<String, Object>) 
action.getParameterValues().get("eventProperties");
         Item target = (Item) action.getParameterValues().get("eventTarget");
-//        String type = (String) target.get("type");
-
-//            Item targetItem = new CustomItem();
-//            BeanUtils.populate(targetItem, target);
 
         Event subEvent = new Event(eventType, event.getSession(), 
event.getProfile(), event.getSourceId(), event, target, event.getTimeStamp());
         subEvent.setProfileId(event.getProfileId());
         subEvent.getAttributes().putAll(event.getAttributes());
         subEvent.getProperties().putAll(eventProperties);
+        if(!toBePersisted){

Review Comment:
   Missing null check, this parameter was not existing before, there is a 
chance that is will be null.
   If null we should continue to have the same behavior as before for 
compatibility reasons.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to