You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Nissim Shiman (Jira)" <ji...@apache.org> on 2020/03/23 19:17:00 UTC
[jira] [Created] (NIFI-7275) onPropertyModified() called before
@OnEnabled for controller services on nifi startup
Nissim Shiman created NIFI-7275:
-----------------------------------
Summary: onPropertyModified() called before @OnEnabled for controller services on nifi startup
Key: NIFI-7275
URL: https://issues.apache.org/jira/browse/NIFI-7275
Project: Apache NiFi
Issue Type: Bug
Affects Versions: 1.10.0
Reporter: Nissim Shiman
On nifi startup, the onPropertyModified() [1] is run for each property of a controller service.
This is run before the ControllerService methods annotated with @OnEnabled [2] are run.
So, when onPropertyModified() references properties that are initialized in the method with @OnEnabled, a java.lang.NullPointerException occurs
[1] https://github.com/apache/nifi/blob/master/nifi-api/src/main/java/org/apache/nifi/components/ConfigurableComponent.java#L68
[2] https://github.com/apache/nifi/blob/master/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java#L67
--
This message was sent by Atlassian Jira
(v8.3.4#803005)