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)

Reply via email to