xiangfu0 commented on a change in pull request #6424: URL: https://github.com/apache/incubator-pinot/pull/6424#discussion_r648975164
########## File path: pinot-spi/src/main/java/org/apache/pinot/spi/plugin/PluginClassLoader.java ########## @@ -36,18 +35,16 @@ public PluginClassLoader(URL[] urls, ClassLoader parent) { super(urls, parent); classLoader = PluginClassLoader.class.getClassLoader(); - Method method = null; - try { - method = URLClassLoader.class.getDeclaredMethod("addURL", URL.class); - - } catch (NoSuchMethodException e) { - //this should never happen - ExceptionUtils.rethrow(e); - } - method.setAccessible(true); for (URL url : urls) { try { - method.invoke(classLoader, url); + /** + * ClassLoader in java9+ does not extend URLClassLoader. Review comment: `URLClassLoader` still extend `ClassLoader` and this `addURL` method is there. Actually, this part also works for java 8. @kishoreg @elonazoulay thoughts? -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org