[ 
https://issues.apache.org/jira/browse/NIFI-5145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16474201#comment-16474201
 ] 

ASF GitHub Bot commented on NIFI-5145:
--------------------------------------

Github user ottobackwards commented on the issue:

    https://github.com/apache/nifi/pull/2672
  
    I think making this consistent for testing is a good idea.  The fact that 
the Mock classes in nifi can replicate the runtime behavior is very important 
to implementors.
    
    I think that the changes to the other processors might be better suited 
outside of this pr though.
    
    Also, I wouldn't mind seeing a comment or more comments in the Mock class 
referencing the runtime behavior they are enforcing.



> MockPropertyValue.evaluateExpressionLanguage(FlowFile) cannot handle null 
> inputs
> --------------------------------------------------------------------------------
>
>                 Key: NIFI-5145
>                 URL: https://issues.apache.org/jira/browse/NIFI-5145
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Mike Thomsen
>            Assignee: Mike Thomsen
>            Priority: Major
>
> The method mentioned in the title line cannot handle null inputs, even though 
> the main NiFi execution classes can handle that scenario. This forces hack to 
> pass testing with nulls that looks like this:
> String val = flowFile != null ? 
> context.getProperty(PROP).evaluateExpressionLanguage(flowfile).getValue() : 
> context.getProperty(PROP).evaluateExpressionLanguage(new 
> HashMap()).getValue();



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to