[ https://issues.apache.org/jira/browse/WW-5279?focusedWorklogId=842581&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-842581 ]
ASF GitHub Bot logged work on WW-5279: -------------------------------------- Author: ASF GitHub Bot Created on: 31/Jan/23 13:31 Start Date: 31/Jan/23 13:31 Worklog Time Spent: 10m Work Description: lukaszlenart commented on code in PR #657: URL: https://github.com/apache/struts/pull/657#discussion_r1091929393 ########## 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: @sepe81 I'm right now creating a task to mark a given code `@Deprecated` and then another task (targeting major/minor release) to remove the code. I found such approach more useful and more informative for the users :) Issue Time Tracking ------------------- Worklog Id: (was: 842581) Time Spent: 1h 10m (was: 1h) > Improve readability of XmlConfigurationProvider class > ----------------------------------------------------- > > Key: WW-5279 > URL: https://issues.apache.org/jira/browse/WW-5279 > Project: Struts 2 > Issue Type: Task > Components: Core > Reporter: Kusal Kithul-Godage > Priority: Trivial > Fix For: 6.2.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010)