You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/07/06 14:10:57 UTC

[GitHub] [nifi-registry] bbende edited a comment on pull request #281: NIFIREG-394: call onConfigured with the same classloader

bbende edited a comment on pull request #281:
URL: https://github.com/apache/nifi-registry/pull/281#issuecomment-654256495


   @ChrisEnglert  thanks for submitting, sorry for the delay in looking at it...
   
   Since we already have a precedent for how this done on the Authorizer's onConfigured [1] and we also have to do this for AccessPolicyProvider, in addition to UserGroupProvide, can we make them all consistent with the way the Authorizer is already done?
   
   All three can be done like this within the existing for loops without having to modify the create methods:
   ```
   final ClassLoader instanceClassLoader = instance.getClass().getClassLoader();
   try (final ExtensionCloseable extClosable = ExtensionCloseable.withClassLoader(instanceClassLoader)) {
       instance.onConfigured(loadAuthorizerConfiguration(provider.getIdentifier(), provider.getProperty()));
   }
   ```
   
   [1] https://github.com/apache/nifi-registry/blob/master/nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/security/authorization/AuthorizerFactory.java#L214-L217


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org