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

Connect PluginType.from(Class) result is incorrect when subclassing multiple plugin interfaces

    XMLWordPrintableJSON

Details

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

    Description

      The PluginType enum encodes the multiple different types of plugins that the plugin discovery infrastructure supports. The `PluginType.from(Class)` method is used to evaluate an arbitrary plugin subclass to determine what type it is.

      This is flawed, because multiple plugin types are interfaces, and a single class may implement multiple plugin interfaces. This has the effect that when a plugin implements multiple classes, it appears multiple times, but each time it is listed under the same arbitrary type. For example, a PluginDesc<Converter> object may contain the type PluginType.HEADER_CONVERTER, which is incorrect.

      This method should be removed to force callers to consider that one plugin may implement multiple types.

      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: