kevinrr888 commented on code in PR #33:
URL: 
https://github.com/apache/accumulo-classloaders/pull/33#discussion_r2590893014


##########
modules/local-caching-classloader/src/test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java:
##########
@@ -224,10 +224,8 @@ public void testInitialInvalidJson() throws Exception {
         def.toJson().substring(0, 4));
     final URL invalidDefUrl = new URL(fs.getUri().toString() + 
invalid.toUri().toString());
 
-    ContextClassLoaderException ex = 
assertThrows(ContextClassLoaderException.class,
+    assertThrows(ContextClassLoaderException.class,
         () -> FACTORY.getClassLoader(invalidDefUrl.toString()));

Review Comment:
   Current change is fine, but it would probably be good to still ensure the 
cause is a JSON problem. Could do something like the following
   ```suggestion
       Throwable exception = assertThrows(ContextClassLoaderException.class,
   () -> FACTORY.getClassLoader(invalidDefUrl.toString()));
       // ensure json is somewhere in the exception
       outer: while (exception != null) {
         for (var trace : exception.getStackTrace()) {
           if (trace.toString().contains("com.google.gson")) {
             break outer;
           }
         }
         exception = exception.getCause();
       }
       assertNotNull(exception);
   ```



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