dlmarion commented on code in PR #3683:
URL: https://github.com/apache/accumulo/pull/3683#discussion_r1290632363
##########
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()) {
Review Comment:
This check was removed in #3678 based on @ctubbsii comments
[here](https://github.com/apache/accumulo/pull/3678#discussion_r1285091831).
We'll have to reconcile the difference of opinion I think.
##########
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);
+ } else {
return
org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader.getClassLoader();
}
}
public static boolean isValidContext(String context) {
Review Comment:
`isValidContext` is only called from `PropUtil.validateProperties`. What you
have below is very similar to my
[original](https://github.com/apache/accumulo/pull/3678/commits/03f0b362463cdb2d17233a7928fd7efee0fbb518#diff-10adcecab49078fcfd1a0694c44f8f67fb0bbcc45bfe89bc624b794de480e3fdR68)
commit in #3678. @ctubbsii comments on that are
[here](https://github.com/apache/accumulo/pull/3678#pullrequestreview-1563829134).
Again, I think we'll need to reconcile the difference of opinion.
--
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]