kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandre Dupriez (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-8752) Ensure plugin classes are instantiable when discovering plugins
Date Mon, 05 Aug 2019 10:47:00 GMT
Alexandre Dupriez created KAFKA-8752:
----------------------------------------

             Summary: Ensure plugin classes are instantiable when discovering plugins
                 Key: KAFKA-8752
                 URL: https://issues.apache.org/jira/browse/KAFKA-8752
             Project: Kafka
          Issue Type: Bug
          Components: core
            Reporter: Alexandre Dupriez
            Assignee: Alexandre Dupriez


While running integration tests from the IntelliJ IDE, it appears plugins fail to loadĀ inĀ {{DelegatingClassLoader.scanUrlsAndAddPlugins}}.
The reason was, in this case, that the class {{org.apache.kafka.connect.connector.ConnectorReconfigurationTest$TestConnector}}
could not be instantiated - which it does not intend to be.

The problem does not when running integration tests with Gradle as the runtime closure is
different from IntelliJ - which includes test sources from modules depended on on the classpath.

While debugging this minor inconvenience, I could see that {{DelegatingClassLoader}} performs
a sanity check on the plugin class to instantiate - as of now, it verifies the class is concrete.
A quick fix for the problem highlighted above could to add an extra condition on the Java
modifiers of the class to ensure it will be instantiable.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message