cshannon commented on code in PR #3206:
URL: https://github.com/apache/accumulo/pull/3206#discussion_r1122419787


##########
core/src/main/java/org/apache/accumulo/core/classloader/URLContextClassLoaderFactory.java:
##########
@@ -63,19 +62,15 @@ public ClassLoader getClassLoader(String context) {
       throw new IllegalArgumentException("Unknown context");
     }
 
-    try {
-      return classloaders.get(context, () -> {
-        LOG.debug("Creating URLClassLoader for context, uris: {}", context);
-        return new URLClassLoader(Arrays.stream(context.split(",")).map(url -> 
{
-          try {
-            return new URL(url);
-          } catch (MalformedURLException e) {
-            throw new RuntimeException(e);
-          }
-        }).collect(Collectors.toList()).toArray(new URL[] {}), 
ClassLoader.getSystemClassLoader());
-      });
-    } catch (ExecutionException e) {
-      throw new RuntimeException(e);
-    }
+    return classloaders.get(context, k -> {
+      LOG.debug("Creating URLClassLoader for context, uris: {}", context);
+      return new URLClassLoader(Arrays.stream(context.split(",")).map(url -> {
+        try {
+          return new URL(url);
+        } catch (MalformedURLException e) {
+          throw new RuntimeException(e);
+        }
+      }).collect(Collectors.toList()).toArray(new URL[] {}), 
ClassLoader.getSystemClassLoader());

Review Comment:
   Good catch, I will go ahead and fix that.



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

Reply via email to