aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-12-17 08:24:22 +0200
committerArtur Signell <artur@vaadin.com>2015-12-17 08:26:01 +0200
commite8788ad447fb80bb81cfdd41c59376286f7eb855 (patch)
treeb008b5c0f0ef49a88df2d568c9d43297479c6a5b
parent3514c57b34f4906ad76fde9b26a34c9818b5d083 (diff)
downloadvaadin-framework-e8788ad447fb80bb81cfdd41c59376286f7eb855.tar.gz
vaadin-framework-e8788ad447fb80bb81cfdd41c59376286f7eb855.zip
Parse true/false as boolean values for push configuration (#19394)
Change-Id: I89e99ebd552b00a1bdc79801a8236aff72b6a290
-rw-r--r--client/src/com/vaadin/client/communication/AtmospherePushConnection.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
index 158638a5ec..698ce3be45 100644
--- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
+++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
@@ -175,8 +175,13 @@ public class AtmospherePushConnection implements PushConnection {
config.setStringValue("logLevel", "debug");
}
for (String param : pushConfiguration.parameters.keySet()) {
- config.setStringValue(param,
- pushConfiguration.parameters.get(param));
+ String value = pushConfiguration.parameters.get(param);
+ if (value.equalsIgnoreCase("true")
+ || value.equalsIgnoreCase("false")) {
+ config.setBooleanValue(param, value.equalsIgnoreCase("true"));
+ } else {
+ config.setStringValue(param, value);
+ }
}
if (pushConfiguration.pushUrl != null) {
url = pushConfiguration.pushUrl;
@@ -440,6 +445,16 @@ public class AtmospherePushConnection implements PushConnection {
this[key] = value;
}-*/;
+ protected final native boolean getBooleanValue(String key)
+ /*-{
+ return this[key];
+ }-*/;
+
+ protected final native void setBooleanValue(String key, boolean value)
+ /*-{
+ this[key] = value;
+ }-*/;
+
}
public static class AtmosphereConfiguration extends AbstractJSO {