You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by joewitt <gi...@git.apache.org> on 2016/07/12 18:35:26 UTC

[GitHub] nifi pull request #534: Fix for NIFI-1838, NIFI-1152, NIFI-2117

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

    https://github.com/apache/nifi/pull/534#discussion_r70495931
  
    --- Diff: nifi-mock/src/main/java/org/apache/nifi/util/MockProcessSession.java ---
    @@ -793,13 +798,21 @@ private void validateState(final FlowFile flowFile) {
                 throw new FlowFileHandlingException(flowFile + " is not the most recent version of this flow file within this session");
             }
     
    +
             for (final List<MockFlowFile> flowFiles : transferMap.values()) {
                 if (flowFiles.contains(flowFile)) {
                     throw new IllegalStateException(flowFile + " has already been transferred");
                 }
             }
         }
     
    +    private void validateDestinationRelation(final Relationship relationship) {
    +        if (!relationships.contains(relationship)) {
    +            rollback();
    --- End diff --
    
    Instead of rollback what it should do is throw "IllegalArgumentException" as per API documentation found here:
      https://github.com/apache/nifi/blob/master/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java#L382-L383


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---