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

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

Github user MikeThomsen commented on the issue:

    https://github.com/apache/nifi/pull/2749
  
    @mattyb149 @alopresto I backed out the FTP-related changes and put a 
temporary fix in there that handles the edge case that was impacting the FTP 
processors. There are two cases that cause trouble right now:
    
    1. You pass a null flowfile to the `evaluateExpressionLanguage(FlowFile)` 
method while it is set to use flowfile attributes.
    2. You pass a null flowfile to that method when it is set to use the 
variable registry.
    
    Since, for the time being, the execution framework doesn't care about these 
things, I think this should work as a solution until that changes.


> 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
>             Fix For: 1.7.0
>
>
> 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