Fix issue where if parameter name is greater then max parameter name length a log error is written when devMode is false - see: https://issues.apache.org/jira/browse/WW-4264

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1553827 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bruce Allen Phillips
2013-12-28 14:08:48 +00:00
parent 66c14ede8f
commit 0feca5fd96
@@ -166,7 +166,7 @@ public class ParametersInterceptor extends MethodFilterInterceptor {
@Inject(XWorkConstants.DEV_MODE)
public void setDevMode(String mode) {
devMode = "true".equals(mode);
devMode = "true".equalsIgnoreCase(mode);
}
/**
@@ -329,7 +329,7 @@ public class ParametersInterceptor extends MethodFilterInterceptor {
newStack.setParameter(name, value);
} catch (RuntimeException e) {
if (devMode) {
notifyDeveloper(action, name, e.getMessage());
notifyDeveloperParameterException(action, name, e.getMessage());
}
}
}
@@ -340,7 +340,7 @@ public class ParametersInterceptor extends MethodFilterInterceptor {
addParametersToContext(ActionContext.getContext(), acceptableParameters);
}
protected void notifyDeveloper(Object action, String property, String message) {
protected void notifyDeveloperParameterException(Object action, String property, String message) {
String developerNotification = LocalizedTextUtil.findText(ParametersInterceptor.class, "devmode.notification",
ActionContext.getContext().getLocale(), "Developer Notification:\n{0}",
new Object[]{