Greg Harris created KAFKA-15244: ----------------------------------- Summary: Connect PluginType.from(Class) result is incorrect when subclassing multiple plugin interfaces Key: KAFKA-15244 URL: https://issues.apache.org/jira/browse/KAFKA-15244 Project: Kafka Issue Type: Bug Components: KafkaConnect Reporter: Greg Harris Assignee: Greg Harris Fix For: 3.6.0
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. -- This message was sent by Atlassian Jira (v8.20.10#820010)