mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
WW-5468 Remove unneeded annotations
This commit is contained in:
+1
-4
@@ -20,17 +20,14 @@ package org.apache.struts.beanvalidation.actions;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import com.opensymphony.xwork2.ModelDriven;
|
||||
import org.apache.struts.beanvalidation.models.Person;
|
||||
import org.apache.struts2.interceptor.parameter.StrutsParameter;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import org.apache.struts.beanvalidation.models.Person;
|
||||
|
||||
public class ModelDrivenAction extends ActionSupport implements ModelDriven<Person>, ModelDrivenActionInterface {
|
||||
|
||||
@Valid
|
||||
private final Person model = new Person();
|
||||
|
||||
@StrutsParameter(depth = 2)
|
||||
@Override
|
||||
public Person getModel() {
|
||||
return model;
|
||||
|
||||
+1
-4
@@ -20,18 +20,15 @@ package org.apache.struts.beanvalidation.actions;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import com.opensymphony.xwork2.ModelDriven;
|
||||
import jakarta.validation.Valid;
|
||||
import org.apache.struts.beanvalidation.constraints.ValidationGroup;
|
||||
import org.apache.struts.beanvalidation.models.Person;
|
||||
import org.apache.struts2.interceptor.parameter.StrutsParameter;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
public class ValidateGroupAction extends ActionSupport implements ModelDriven<Person> {
|
||||
|
||||
@Valid
|
||||
private final Person model = new Person();
|
||||
|
||||
@StrutsParameter(depth = 2)
|
||||
@Override
|
||||
public Person getModel() {
|
||||
return model;
|
||||
|
||||
@@ -35,7 +35,6 @@ import com.opensymphony.xwork2.util.XWorkTestCaseHelper;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.interceptor.parameter.StrutsParameter;
|
||||
import org.apache.struts2.ognl.StrutsOgnlGuard;
|
||||
import org.apache.struts2.result.HttpHeaderResult;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
@@ -298,7 +297,6 @@ public class RestActionInvocationTest extends TestCase {
|
||||
|
||||
List<String> model;
|
||||
|
||||
@StrutsParameter(depth = 1)
|
||||
@Override
|
||||
public List<String> getModel() {
|
||||
return model;
|
||||
|
||||
@@ -44,9 +44,8 @@ public class ModelDrivenAction extends ActionSupport implements ModelDriven {
|
||||
/**
|
||||
* @return the model to be pushed onto the ValueStack after the Action itself
|
||||
*/
|
||||
@StrutsParameter(depth = 2)
|
||||
@Override
|
||||
public Object getModel() {
|
||||
public TestBean getModel() {
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user