dlmarion commented on code in PR #3678:
URL: https://github.com/apache/accumulo/pull/3678#discussion_r1287311984


##########
core/src/main/java/org/apache/accumulo/core/classloader/ClassLoaderUtil.java:
##########
@@ -75,11 +75,28 @@ static synchronized void resetContextFactoryForTests() {
 
   @SuppressWarnings("deprecation")
   public static ClassLoader getClassLoader(String context) {
-    if (context != null && !context.isEmpty()) {
-      return FACTORY.getClassLoader(context);
-    } else {
+    if (FACTORY == null) {
       return 
org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader.getClassLoader();
     }
+    ClassLoader cl;
+    try {
+      cl = FACTORY.getClassLoader(context);
+      return (cl == null)

Review Comment:
   I'm going to modify this. The javadoc already says that 
`ContextClassLoaderFactory.getClassLoader` should throw a RuntimeException.



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