aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-06-12 11:11:08 +0300
committerLeif Åstrand <leif@vaadin.com>2013-06-12 11:11:08 +0300
commit6ba89380c83d681fa2361e154671cdf3f4b758cd (patch)
treefcffeb53bd84dd482b6bc31573c2af2e59f19f05 /server
parentda0a11208888f7883bf40fe31019d3a80940e19f (diff)
downloadvaadin-framework-6ba89380c83d681fa2361e154671cdf3f4b758cd.tar.gz
vaadin-framework-6ba89380c83d681fa2361e154671cdf3f4b758cd.zip
Restore legacyPropertyToString value parsing logic (#11970)
Change-Id: If9d46577e4d59999f35fcf6478d06652ac80468a
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/DefaultDeploymentConfiguration.java26
1 files changed, 17 insertions, 9 deletions
diff --git a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
index a55c3231f3..0a8096e84c 100644
--- a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
+++ b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
@@ -86,17 +86,25 @@ public class DefaultDeploymentConfiguration implements DeploymentConfiguration {
}
private void checkLegacyPropertyToString() {
+ // Verify that the default value has not changed without also
+ // updating logic here
+ assert DEFAULT_LEGACY_PROPERTY_TO_STRING.toString().equals("warning");
+
String param = getApplicationOrSystemProperty(
- Constants.SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING,
- DEFAULT_LEGACY_PROPERTY_TO_STRING.name().toLowerCase());
+ Constants.SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING, "warning");
- try {
- legacyPropertyToStringMode = LegacyProperyToStringMode
- .valueOf(param.toUpperCase());
- } catch (IllegalArgumentException e) {
- getLogger().log(Level.WARNING,
- Constants.WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE,
- param);
+ if ("true".equals(param)) {
+ legacyPropertyToStringMode = LegacyProperyToStringMode.ENABLED;
+ } else if ("false".equals(param)) {
+ legacyPropertyToStringMode = LegacyProperyToStringMode.DISABLED;
+ } else {
+ if (!"warning".equals(param)) {
+ getLogger()
+ .log(Level.WARNING,
+ Constants.WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE,
+ param);
+
+ }
legacyPropertyToStringMode = DEFAULT_LEGACY_PROPERTY_TO_STRING;
}
}