Akshat-Jain commented on code in PR #17559:
URL: https://github.com/apache/druid/pull/17559#discussion_r1881809298


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/HadoopTask.java:
##########
@@ -173,15 +173,13 @@ public static ClassLoader buildClassLoader(final 
List<String> hadoopDependencyCo
       localClassLoaderURLs.addAll(Arrays.asList(hadoopLoader.getURLs()));
     }
 
-    ClassLoader parent = null;
-    if (JvmUtils.isIsJava9Compatible()) {
-      try {
-        // See also 
https://docs.oracle.com/en/java/javase/11/migrate/index.html#JSMIG-GUID-A868D0B9-026F-4D46-B979-901834343F9E
-        parent = (ClassLoader) 
ClassLoader.class.getMethod("getPlatformClassLoader").invoke(null);
-      }
-      catch (IllegalAccessException | InvocationTargetException | 
NoSuchMethodException e) {
-        throw new RuntimeException(e);
-      }
+    ClassLoader parent;
+    try {
+      // See also 
https://docs.oracle.com/en/java/javase/11/migrate/index.html#JSMIG-GUID-A868D0B9-026F-4D46-B979-901834343F9E
+      parent = (ClassLoader) 
ClassLoader.class.getMethod("getPlatformClassLoader").invoke(null);

Review Comment:
   Have made the change.
   As discussed offline, the animal-sniffer check was causing failures since 
it's currently configured to use JDK8 signature, and upgrading animal-sniffer 
can be a separate follow-up item after this.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to