You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by JPercivall <gi...@git.apache.org> on 2016/12/05 21:54:13 UTC

[GitHub] nifi pull request #1297: NIFI-3133: Ensure correct checks against Remote Gro...

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

    https://github.com/apache/nifi/pull/1297#discussion_r90964122
  
    --- Diff: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java ---
    @@ -4034,19 +4034,29 @@ public Authorizable createDataAuthorizable(final String componentId) {
                         authorizable = new DataAuthorizable(connection.getSource());
                     }
                 } else {
    -                // authorizable for remote group ports should be the remote process group
    -                if (connectable instanceof RemoteGroupPort) {
    -                    authorizable = new DataAuthorizable(((RemoteGroupPort) connectable).getRemoteProcessGroup());
    -                } else {
    -                    authorizable = new DataAuthorizable(connectable);
    -                }
    +                authorizable = new DataAuthorizable(connectable);
                 }
             }
     
             return authorizable;
         }
     
         @Override
    +    public Authorizable createRemoteDataAuthorizable(String remoteGroupPortId) {
    +        final DataAuthorizable authorizable;
    +
    +        final RemoteGroupPort remoteGroupPort = getRootGroup().findRemoteGroupPort(remoteGroupPortId);
    +        if (remoteGroupPort == null) {
    +            throw new ResourceNotFoundException("The component that generated this event is no longer part of the data flow.");
    --- End diff --
    
    I think there is a bit of copy paste error with this Exception message. My understanding is that this method is not limited to an "event".


---
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.
---