mirror of
https://github.com/apache/struts.git
synced 2026-08-06 15:17:00 +00:00
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:
+3
-3
@@ -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[]{
|
||||
|
||||
Reference in New Issue
Block a user