Copilot commented on code in PR #1377:
URL: https://github.com/apache/struts/pull/1377#discussion_r2442006887


##########
core/src/main/java/org/apache/struts2/config/providers/InterceptorBuilder.java:
##########
@@ -70,22 +70,14 @@ public static List<InterceptorMapping> 
constructInterceptorReference(Interceptor
             throw new ConfigurationException("Unable to find interceptor class 
referenced by ref-name " + refName, location);
         } else {
             if (referencedConfig instanceof InterceptorConfig config) {
-                try {
-                    Interceptor inter = objectFactory.buildInterceptor(config, 
refParams);
-                    result.add(new InterceptorMapping(refName, inter, 
refParams));
-                } catch (ConfigurationException ex) {
-                   LOG.warn(new ParameterizedMessage("Unable to load config 
class {} at {} probably due to a missing jar, which might be fine if you never 
plan to use the {} interceptor",
-                            config.getClassName(), ex.getLocation(), 
config.getName()), ex);
-                }
-
+                Interceptor inter = objectFactory.buildInterceptor(config, 
refParams);
+                result.add(new InterceptorMapping(refName, inter, refParams));

Review Comment:
   With the removal of exception handling, this method now throws 
`ConfigurationException` without catching it. The method signature should be 
updated to document this change by adding `throws ConfigurationException` to 
the method declaration, or the Javadoc should be updated to indicate that this 
exception can be thrown.



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