[
https://issues.apache.org/jira/browse/NIFI-632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14590422#comment-14590422
]
Dan Bress commented on NIFI-632:
--------------------------------
[~mcgilman] and [~markap14], was thinking about the root issue of this ticket
today, and wanted to get your take on something.
The DocGenerator is calling init() so that properties and relationships are
retrievable via getPropertyDescriptors() and getRelationships(). The issue
Matt pointed out, was in an init method it was loading resources from the nar.
Well what if we stopped setting up properties and relationships in the init
method and moved this to the constructor? Then the DocGenerator would not need
to call the init method.
There
[are|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ModifyBytes.java#L75-L84]
[cases|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteSQL.java#L94-L104]
[of|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenUDP.java#L120-L285]
[this|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutJMS.java#L112-L135]
[already|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java#L131-L135].
To be clear, I am proposing keeping the init methods, but moving
property/relationship list initialization to the constructor, and no longer
having the DocGenerator call init
> Documentation Generation: Nar ClassLoader
> -----------------------------------------
>
> Key: NIFI-632
> URL: https://issues.apache.org/jira/browse/NIFI-632
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 0.1.0
> Reporter: Matt Gilman
> Assignee: Dan Bress
> Priority: Minor
> Fix For: 0.2.0
>
> Attachments: 0001-Squashed-commit-of-the-following.patch
>
>
> When auto generating component documentation the NarThreadContextClassLoader
> needs to be set in case the component attempts to load anything off of its
> classpath. Without this, the documentation generation fails.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)