Skip to content

Commit

Permalink
WW-5468 Remove unneeded annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
kusalk committed Oct 12, 2024
1 parent a57f51c commit 10f4730
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public String getFoo() {
/**
* @return the model to be pushed onto the ValueStack after the Action itself
*/
@StrutsParameter(depth = 2)
@Override
public Object getModel() {
return model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public String getFoo() {
/**
* @return the model to be pushed onto the ValueStack after the Action itself
*/
@StrutsParameter(depth = 2)
@Override
public Object getModel() {
return model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ protected void tearDown() throws Exception {
}


public class ModelDrivenAction extends ActionSupport implements ModelDriven {
public class ModelDrivenAction extends ActionSupport implements ModelDriven<Object> {

@Override
public Object getModel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package com.opensymphony.xwork2.test;

import com.opensymphony.xwork2.ModelDrivenAction;
import org.apache.struts2.interceptor.parameter.StrutsParameter;


/**
Expand All @@ -35,7 +34,6 @@ public class ModelDrivenAction2 extends ModelDrivenAction {
/**
* @return the model to be pushed onto the ValueStack after the Action itself
*/
@StrutsParameter(depth = 3)
@Override
public Object getModel() {
return model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package com.opensymphony.xwork2.test;

import com.opensymphony.xwork2.ModelDrivenAnnotationAction;
import org.apache.struts2.interceptor.parameter.StrutsParameter;


/**
Expand All @@ -36,7 +35,6 @@ public class ModelDrivenAnnotationAction2 extends ModelDrivenAnnotationAction {
/**
* @return the model to be pushed onto the ValueStack after the Action itself
*/
@StrutsParameter(depth = 3)
@Override
public Object getModel() {
return model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package com.opensymphony.xwork2.validator;

import com.opensymphony.xwork2.ModelDriven;
import org.apache.struts2.interceptor.parameter.StrutsParameter;


/**
Expand All @@ -33,7 +32,6 @@ public class VisitorValidatorModelAction extends VisitorValidatorTestAction impl
/**
* @return the model to be pushed onto the ValueStack instead of the Action itself
*/
@StrutsParameter(depth = 2)
@Override
public Object getModel() {
return getBean();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,15 @@

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
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;
Expand Down Expand Up @@ -298,7 +297,6 @@ static class RestAction extends RestActionSupport implements ModelDriven<List<St

List<String> model;

@StrutsParameter(depth = 1)
@Override
public List<String> getModel() {
return model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public String getFoo() {
/**
* @return the model to be pushed onto the ValueStack after the Action itself
*/
@StrutsParameter(depth = 2)
@Override
public Object getModel() {
return model;
Expand Down

0 comments on commit 10f4730

Please sign in to comment.