mirror of
https://github.com/apache/struts.git
synced 2026-08-06 07:06:58 +00:00
WW-5352 Rename acceptable name/value methods
This commit is contained in:
+16
-2
@@ -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!";
|
||||
|
||||
Reference in New Issue
Block a user