Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2443#discussion_r170070317
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java
 ---
    @@ -226,6 +242,8 @@ private ObjectWriter getObjectWriter(ObjectMapper 
mapper, String ppSetting) {
     
         @Override
         public void onTrigger(final ProcessContext context, final 
ProcessSession session) throws ProcessException {
    +        FlowFile input = session.get();
    --- End diff --
    
    It's not checking for input == null here, that would be one of the 
requirements for the "flowfile-driven behavior" rather than the "timer-driven 
behavior". It might cause an NPE at line 266, and otherwise if null you may be 
treating it as flowfile-driven when really it is more like timer-driven. 
ExecuteSQL has a good example of how to handle this.


---

Reply via email to