diff --git a/core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java index e93b60a28..efc4a7b04 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java @@ -337,6 +337,13 @@ public class ParametersInterceptor extends MethodFilterInterceptor { .collect(joining()); } + /** + * @deprecated since 6.4.0, use {@link #isAcceptableName} + */ + protected boolean acceptableName(String name) { + return isAcceptableName(name); + } + /** * Validates the name passed is: * * Within the max length of a parameter name @@ -346,7 +353,7 @@ public class ParametersInterceptor extends MethodFilterInterceptor { * @param name - Name to check * @return true if accepted */ - protected boolean acceptableName(String name) { + protected boolean isAcceptableName(String name) { if (isIgnoredDMI(name)) { LOG.trace("DMI is enabled, ignoring DMI method: {}", name); return false; @@ -365,6 +372,13 @@ public class ParametersInterceptor extends MethodFilterInterceptor { return DMI_IGNORED_PATTERN.matcher(name).matches(); } + /** + * @deprecated since 6.4.0, use {@link #isAcceptableValue} + */ + protected boolean acceptableValue(String name, String value) { + return isAcceptableValue(name, value); + } + /** * Validates: * * Value is null/blank @@ -375,7 +389,7 @@ public class ParametersInterceptor extends MethodFilterInterceptor { * @param value - value to check * @return true if accepted */ - protected boolean acceptableValue(String name, String value) { + protected boolean isAcceptableValue(String name, String value) { boolean accepted = value == null || value.isEmpty() || (!isParamValueExcluded(value) && isParamValueAccepted(value)); if (!accepted) { String message = "Value [{}] of parameter [{}] was not accepted and will be dropped!";