EdColeman commented on code in PR #3683:
URL: https://github.com/apache/accumulo/pull/3683#discussion_r1290691049


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

Review Comment:
   I agree with `I don't think it possible to avoid bad config being set` - but 
I though these changes where an attempt to validate that, at a minimum an 
existing path was set?  
   
   One complication (of many) is that the classpath maybe a regex, that may or 
may not contain the needed jars / classes - it is only when the use code tries 
to access a class that it is know to be present.  There is no way for our 
general code to know which jars / classes will be needed / used at any given 
point by the users.
   
   Or have I lost the thread on this and misunderstanding the scope of the 
check and what we are attempting to protect against?



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