kusalk commented on code in PR #657:
URL: https://github.com/apache/struts/pull/657#discussion_r1090875752


##########
core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java:
##########
@@ -439,28 +445,16 @@ protected void addAction(Element actionElement, 
PackageConfig.Builder packageCon
         String name = actionElement.getAttribute("name");
         String className = actionElement.getAttribute("class");
         //methodName should be null if it's not set
-        String methodName = 
StringUtils.trimToNull(actionElement.getAttribute("method"));
+        String methodName = trimToNull(actionElement.getAttribute("method"));
         Location location = DomHelper.getLocationObject(actionElement);
 
         if (location == null) {
             LOG.warn("Location null for {}", className);
         }
 
-        // if there isn't a class name specified for an <action/> then try to
-        // use the default-class-ref from the <package/>
-        if (StringUtils.isEmpty(className)) {
-            // if there is a package default-class-ref use that, otherwise use 
action support
-           /* if (StringUtils.isNotEmpty(packageContext.getDefaultClassRef())) 
{
-                className = packageContext.getDefaultClassRef();
-            } else {
-                className = ActionSupport.class.getName();
-            }*/
-
-        } else {
-            if (!verifyAction(className, name, location)) {
-                LOG.error("Unable to verify action [{}] with class [{}], from 
[{}]", name, className, location);
-                return;
-            }
+        if (!className.isEmpty() && !verifyAction(className, name, location)) {

Review Comment:
   There's multiple methods in this class with unused params - I've kept them 
to maintain compatibility with potential subclasses. Perhaps something to 
revisit when releasing the next major version.



-- 
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: issues-unsubscr...@struts.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to