Merge pull request #310 from aleksandr-m/feature/WW-4998_i18ninterceptor
WW-4998 I18nInterceptor's default storage should store locale
diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
index 08b2d86..c58d14e 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
@@ -84,10 +84,6 @@
@Inject(XWorkConstants.DEV_MODE)
protected void setDevMode(String mode) {
this.devMode = BooleanUtils.toBoolean(mode);
- if (this.devMode) {
- LOG.warn("Setting development mode [{}] affects the safety of your application!",
- this.devMode);
- }
}
@Inject(XWorkConstants.ENABLE_OGNL_EXPRESSION_CACHE)
@@ -178,20 +174,11 @@
@Inject(value = XWorkConstants.ALLOW_STATIC_METHOD_ACCESS, required = false)
protected void setAllowStaticMethodAccess(String allowStaticMethodAccess) {
this.allowStaticMethodAccess = BooleanUtils.toBoolean(allowStaticMethodAccess);
- if (this.allowStaticMethodAccess) {
- LOG.warn("Setting allow static method access [{}] affects the safety of your application!",
- this.allowStaticMethodAccess);
- }
}
@Inject(value = StrutsConstants.STRUTS_DISALLOW_PROXY_MEMBER_ACCESS, required = false)
protected void setDisallowProxyMemberAccess(String disallowProxyMemberAccess) {
-
this.disallowProxyMemberAccess = Boolean.parseBoolean(disallowProxyMemberAccess);
- if (this.disallowProxyMemberAccess == false) {
- LOG.warn("Setting disallow proxy member access [{}] should only be done intentionally!",
- this.disallowProxyMemberAccess);
- }
}
public boolean isDisallowProxyMemberAccess() {
diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
index 01a98ba..054e81a 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
@@ -104,10 +104,6 @@
@Inject(XWorkConstants.DEV_MODE)
protected void setDevMode(String mode) {
this.devMode = BooleanUtils.toBoolean(mode);
- if (this.devMode) {
- LOG.warn("Setting development mode [{}] affects the safety of your application!",
- this.devMode);
- }
}
@Inject(value = "logMissingProperties", required = false)
@@ -162,8 +158,6 @@
}
/**
-
- /**
* @see com.opensymphony.xwork2.util.ValueStack#setValue(java.lang.String, java.lang.Object)
*/
public void setValue(String expr, Object value) {
diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStackFactory.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStackFactory.java
index 36ca51d..a5f476f 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStackFactory.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStackFactory.java
@@ -64,10 +64,6 @@
@Inject(value="allowStaticMethodAccess", required=false)
protected void setAllowStaticMethodAccess(String allowStaticMethodAccess) {
this.allowStaticMethodAccess = BooleanUtils.toBoolean(allowStaticMethodAccess);
- if (this.allowStaticMethodAccess) {
- LOG.warn("Setting allow static method access [{}] affects the safety of your application!",
- this.allowStaticMethodAccess);
- }
}
public ValueStack createValueStack() {
diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java b/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java
index be0ea8d..e81511e 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java
@@ -68,10 +68,6 @@
@Inject(XWorkConstants.DEV_MODE)
protected void setDevMode(String mode) {
this.devMode = BooleanUtils.toBoolean(mode);
- if (this.devMode) {
- LOG.warn("Setting development mode [{}] affects the safety of your application!",
- this.devMode);
- }
}
public void setProperty(Map context, Object target, Object name, Object value) throws OgnlException {
diff --git a/core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java b/core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
index ce7ba34..30eacef 100644
--- a/core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
+++ b/core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
@@ -73,8 +73,7 @@
if (acceptedPatterns == null) {
// Limit unwanted log entries (for 1st call, acceptedPatterns null)
LOG.debug("Sets accepted patterns to [{}], note this impacts the safety of your application!", patterns);
- }
- else {
+ } else {
LOG.warn("Replacing accepted patterns [{}] with [{}], be aware that this affects all instances and safety of your application!",
acceptedPatterns, patterns);
}
diff --git a/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java b/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
index e93683a..8a9257b 100644
--- a/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
+++ b/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
@@ -51,8 +51,7 @@
if (excludedPatterns != null && excludedPatterns.size() > 0) {
LOG.warn("Overriding excluded patterns [{}] with [{}], be aware that this affects all instances and safety of your application!",
excludedPatterns, excludePatterns);
- }
- else {
+ } else {
// Limit unwanted log entries (when excludedPatterns null/empty - usually 1st call)
LOG.debug("Overriding excluded patterns with [{}]", excludePatterns);
}
@@ -76,9 +75,6 @@
LOG.debug("DMI is disabled, adding DMI related excluded patterns");
setAdditionalExcludePatterns("^(action|method):.*");
}
- else {
- LOG.warn("DMI is enabled, *NOT* adding DMI related excluded patterns");
- }
}
public void setExcludedPatterns(String commaDelimitedPatterns) {
@@ -93,8 +89,7 @@
if (excludedPatterns != null && excludedPatterns.size() > 0) {
LOG.warn("Replacing excluded patterns [{}] with [{}], be aware that this affects all instances and safety of your application!",
excludedPatterns, patterns);
- }
- else {
+ } else {
// Limit unwanted log entries (when excludedPatterns null/empty - usually 1st call)
LOG.debug("Sets excluded patterns to [{}]", patterns);
}