dejan2609 opened a new pull request, #23824: URL: https://github.com/apache/kafka/pull/23824
**Jira ticket:** KAFKA-21284 **Rationale:** - https://github.com/classgraph/classgraph/releases#release-classgraph-4.8.199 > **_4.8.199 is the last ClassGraph 4.x release_**. ClassGraph 4.x has reached end of life: there will be no further 4.x releases, other than releases that backport fixes for serious bugs. - https://github.com/classgraph/classgraph/wiki/Porting-ClassGraph-4.x-code-to-ClassGraph-6.x > **_ClassGraph 5.x._** This page describes ClassGraph 6.x, which requires JDK 25 or newer. ClassGraph 5.x has the same API and the same behavior, runs on JDK 17 or newer, and is kept in sync with 6.x for critical bug-fix releases. ___ **Change description (as provided by Claude Opus 5.5):** ClassGraph 5.x scans nothing unless a source is enabled, renames the transitive hierarchy queries, no longer loads classes, and is split into several jars. Connect's ReflectionScanner is the only user of the ClassGraph API in Kafka, so the port is limited to it and to the build. - overrideClassLoaders(...) -> enableClassLoaders(...), plus enableNonSystemModules() to keep the 4.x behavior: the scanned chain (the plugin classloader and all its parents) includes the application classloader, for which 4.x enabled non-system module scanning implicitly. System modules, which 4.x also scanned implicitly because of the platform classloader, are left out since they cannot contain plugins; the results are unchanged and the scan is cheaper. - getClassesImplementing/getSubclasses -> getAllClassesImplementing/ getAllSubclasses, which keep the transitive results 4.x returned. - replace the removed ClassInfoList#loadClasses(klass, true) with a new static helper that loads each class via Class.forName(name, false, source.loader()), i.e. from the isolated plugin classloader and without initializing it, and returns it as a subtype of the plugin type. As with ignoreExceptions=true in 4.x, classes that cannot be loaded, or are not subtypes, are skipped (with a debug log). - keep ClassGraph 5.x off the genConnectOpenAPIDocs classpath, since swagger-jaxrs2 still needs ClassGraph 4.x (it calls the removed enableAllInfo()); otherwise the task fails and breaks releaseTarGz. Build-time only (Swagger is not shipped); drop once Swagger supports ClassGraph 5.x. - list the split classgraph-base/-vfs/-classpath jars in LICENSE-binary and update the classgraph-MIT copyright year to match the 5.0.0 jar. Co-Authored-By: Claude Opus 5.5 <[email protected]> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
