Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-14863

Plugins which do not have a valid no-args constructor are visible in the REST API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.6.0
    • connect
    • None

    Description

      Currently, the Connect plugin discovery mechanisms only assert that a no-args constructor is present when necessary. In particular, this assertion happens for Connectors when the framework needs to evaluate the connector's version method.
      It also happens for ConnectorConfigOverridePolicy, ConnectRestExtension, and ConfigProvider plugins, which are loaded via the ServiceLoader. The ServiceLoader constructs instances of plugins with their no-args constructor during discovery, so these plugins are discovered even if they are not Versioned.

      This has the effect that these unusable plugins which are missing a default constructor appear in the REST API, but are not able to be instantiated or used. To make the ServiceLoader and Reflections discovery mechanisms behave more similar, this assertion should be applied to all plugins, and a log message emitted when plugins do not follow the constructor requirements.

      Attachments

        Issue Links

          Activity

            People

              gharris1727 Greg Harris
              gharris1727 Greg Harris
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: