summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorFabian Lange <lange.fabian@gmail.com>2014-07-09 16:23:43 +0200
committerVaadin Code Review <review@vaadin.com>2014-07-10 09:40:01 +0000
commit7e61c396f28df7bda5e3015600009db6fb19ce80 (patch)
tree4678766ba9c796fc8367352ba1f24bef5d34e879 /server
parent9ea199521481b08e8a349953323cd9a3b58d3801 (diff)
downloadvaadin-framework-7e61c396f28df7bda5e3015600009db6fb19ce80.tar.gz
vaadin-framework-7e61c396f28df7bda5e3015600009db6fb19ce80.zip
Fix overwrite mechanism for web.xml atmosphere init params (#14196).
Non obvious problem before. "config" is a property of AtmosphereFramework which also has getInitParameter(String) method. So it compiles but does not do what is intended: to check against the user defined web.xml servlet init-prams. (the variableName servletConfig has the same problem :-)) Change-Id: Ib02f0b94312327d482775456c2d63a904b1e8104
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/communication/PushRequestHandler.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/server/src/com/vaadin/server/communication/PushRequestHandler.java b/server/src/com/vaadin/server/communication/PushRequestHandler.java
index db14e73c1a..308f94686f 100644
--- a/server/src/com/vaadin/server/communication/PushRequestHandler.java
+++ b/server/src/com/vaadin/server/communication/PushRequestHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -47,7 +47,7 @@ import com.vaadin.shared.communication.PushConstants;
* Handles requests to open a push (bidirectional) communication channel between
* the client and the server. After the initial request, communication through
* the push channel is managed by {@link PushHandler}.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -66,7 +66,8 @@ public class PushRequestHandler implements RequestHandler,
public PushRequestHandler(VaadinServletService service)
throws ServiceException {
- final ServletConfig config = service.getServlet().getServletConfig();
+ final ServletConfig vaadinServletConfig = service.getServlet()
+ .getServletConfig();
atmosphere = new AtmosphereFramework() {
@Override
@@ -77,7 +78,7 @@ public class PushRequestHandler implements RequestHandler,
@Override
public AtmosphereFramework addInitParameter(String name,
String value) {
- if (config.getInitParameter(name) == null) {
+ if (vaadinServletConfig.getInitParameter(name) == null) {
super.addInitParameter(name, value);
}
return this;
@@ -117,7 +118,7 @@ public class PushRequestHandler implements RequestHandler,
"org.atmosphere.cpr.showSupportMessage", "false");
try {
- atmosphere.init(config);
+ atmosphere.init(vaadinServletConfig);
// Ensure the client-side knows how to split the message stream
// into individual messages when using certain transports