[
https://issues.apache.org/jira/browse/NIFI-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14389308#comment-14389308
]
ASF subversion and git services commented on NIFI-424:
------------------------------------------------------
Commit ac409fd69aefedbfa72f90d1647da4309cf46dfc in incubator-nifi's branch
refs/heads/NIFI-250 from [~devriesb]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=ac409fd ]
NIFI-424
Processors / Controller Services should not be able to directly call
ControllerService.initialize and ControllerService.onPropertyModified
> Processors / Controller Services should not be able to directly call
> ControllerService.initialize and ControllerService.onPropertyModified
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-424
> URL: https://issues.apache.org/jira/browse/NIFI-424
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Brandon DeVries
> Fix For: 0.1.0
>
> Attachments: 0001-NIFI-424.patch
>
>
> Currently, when a component obtains a Controller Service, it could call
> onPropertyModified or initialize, which can cause some weird and unexpected
> behaviors, since these methods are expected to be called only within the
> constraints of a well-defined component lifecycle. We should prevent this by
> intercepting the method call and throwing an IllegalStateException unless the
> method call is coming from the framework.
> Implementation details: This can be achieved by looking at the
> StandardControllerServiceProvider, which implements all Controller Service
> interfaces with proxies. In that proxy, it should simply throw an Exception.
> Then, just ensure that the framework never calls the proxy but only calls
> directly into the implementing class.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)