dlmarion commented on code in PR #3683:
URL: https://github.com/apache/accumulo/pull/3683#discussion_r1290650278
##########
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:
IIRC @EdColeman had commented to me that only checking when the property is
set could also lead to an issue if the context definition / configuration
changes afterwards. That is why I'm also checking the validity of context name
in getClassLoader in #3678 .
--
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]