Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-424

Processors / Controller Services should not be able to directly call ControllerService.initialize and ControllerService.onPropertyModified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.1.0
    • Core Framework
    • None

    Description

      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.

      Attachments

        1. 0001-NIFI-424.patch
          10 kB
          Brandon Rhys DeVries

        Activity

          People

            devriesb Brandon Rhys DeVries
            markap14 Mark Payne
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: