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

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

Github user m-hogue commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1988#discussion_r126092307
  
    --- Diff: 
nifi-mock/src/main/java/org/apache/nifi/util/MockProcessSession.java ---
    @@ -756,6 +756,13 @@ public void transfer(FlowFile flowFile) {
                 throw new IllegalArgumentException("I only accept 
MockFlowFile");
             }
     
    +        // if the flowfile provided was created in this session (i.e. it's 
in currentVersions),
    +        // then throw an exception indicating that you can't transfer 
flowfiles back to self.
    +        // this mimics the behavior of StandardProcessSession
    +        if(currentVersions.get(flowFile.getId()) != null) {
    --- End diff --
    
    @jskora thanks for the comment. That makes sense. I'll update the PR 
accordingly. Much appreciated. 


> MockProcessSession should prevent transferring new FlowFile to input queue
> --------------------------------------------------------------------------
>
>                 Key: NIFI-3218
>                 URL: https://issues.apache.org/jira/browse/NIFI-3218
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.1.0, 0.8.0
>            Reporter: Joe Skora
>            Assignee: Michael Hogue
>
> StandardProcessSession.transfer() throws an exception if called with a newly 
> created FlowFile and no relationship.  MockProcessionSession should behave 
> similarly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to