WW-5440 Deprecate AnnotationParameterFilterInterceptor

This commit is contained in:
Kusal Kithul-Godage
2024-07-13 21:21:52 +10:00
parent fcc2c9d3ab
commit 56c1291d2f
4 changed files with 11 additions and 2 deletions
@@ -28,9 +28,11 @@ import java.lang.annotation.Target;
* a HttpRequest parameter.
*
* @author martin.gilday
* @deprecated since 6.6.0, use {@link org.apache.struts2.interceptor.parameter.StrutsParameter}.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Deprecated
public @interface Allowed {
}
@@ -23,13 +23,13 @@ import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor;
import com.opensymphony.xwork2.interceptor.ParametersInterceptor;
import com.opensymphony.xwork2.util.AnnotationUtils;
import org.apache.struts2.dispatcher.HttpParameters;
import org.apache.struts2.interceptor.parameter.ParametersInterceptor;
import org.apache.struts2.interceptor.parameter.StrutsParameter;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
/**
@@ -46,7 +46,10 @@ import java.util.List;
* </p>
*
* @author martin.gilday
* @deprecated since 6.6.0, integrated into {@link ParametersInterceptor} with {@link StrutsParameter} using
* {@code struts.parameters.requireAnnotations=true}
*/
@Deprecated
public class AnnotationParameterFilterInterceptor extends AbstractInterceptor {
/* (non-Javadoc)
@@ -31,9 +31,11 @@ import java.lang.annotation.Target;
* To allow access to a field it must be annotated with {@link Allowed}
*
* @author martin.gilday
* @deprecated since 6.6.0, use {@code struts.parameters.requireAnnotations=true} to block all parameters globally.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Deprecated
public @interface BlockByDefault {
}
@@ -28,9 +28,11 @@ import java.lang.annotation.Target;
* a HttpRequest parameter.
*
* @author martin.gilday
* @deprecated since 6.6.0, use {@code struts.parameters.requireAnnotations=true} to block all parameters globally.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Deprecated
public @interface Blocked {
}