Merge pull request #1072 from apache/fix/WW-5468-modeldriven-2

WW-5468 Exempt ModelDriven Actions from @StrutsParameter requirement
This commit is contained in:
Kusal Kithul-Godage
2024-10-14 18:59:11 +11:00
parent 8566c14648
commit 7cdcd84b83
17 changed files with 252 additions and 219 deletions
@@ -23,7 +23,6 @@ import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.ActionProxyFactory;
import com.opensymphony.xwork2.config.Configuration;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.HttpParameters;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.springframework.mock.web.MockHttpServletRequest;
@@ -75,7 +74,7 @@ public class StrutsRestTestCase<T> extends StrutsJUnit4TestCase<T> {
ActionMapping mapping = getActionMapping(request);
assertNotNull(mapping);
Dispatcher.getInstance().serviceAction(request, response, mapping);
dispatcher.serviceAction(request, response, mapping);
if (response.getStatus() != HttpServletResponse.SC_OK)
throw new ServletException("Error code [" + response.getStatus() + "], Error: ["