dlmarion commented on code in PR #3678:
URL: https://github.com/apache/accumulo/pull/3678#discussion_r1287307070
##########
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();
}
Review Comment:
I added this because I noticed that referencing FACTORY without calling
`initContextFactory` would cause a NPE. Looking at where this is called, I
think the probability of it happening is low. I'm going to back this change
out.
--
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]