aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main
diff options
context:
space:
mode:
authorTatu Lund <tatu@vaadin.com>2020-11-24 12:32:22 +0200
committerGitHub <noreply@github.com>2020-11-24 12:32:22 +0200
commit00159ed3d272ffc9a5cdbd1c44d06e071e685dd8 (patch)
tree57faa6963887d10f8685388b11214ea2ad8010e7 /server/src/main
parent361395f198e0493d14ec0b8eb48a8ebc2759eae2 (diff)
downloadvaadin-framework-00159ed3d272ffc9a5cdbd1c44d06e071e685dd8.tar.gz
vaadin-framework-00159ed3d272ffc9a5cdbd1c44d06e071e685dd8.zip
Make checkAtmosphereSupport() non-static (#12131)
Fixes: https://github.com/vaadin/multiplatform-runtime/issues/77
Diffstat (limited to 'server/src/main')
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinService.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/main/java/com/vaadin/server/VaadinService.java b/server/src/main/java/com/vaadin/server/VaadinService.java
index 4f01820868..31ddf7b8ba 100644
--- a/server/src/main/java/com/vaadin/server/VaadinService.java
+++ b/server/src/main/java/com/vaadin/server/VaadinService.java
@@ -145,7 +145,7 @@ public abstract class VaadinService implements Serializable {
private Iterable<DependencyFilter> dependencyFilters;
private ConnectorIdGenerator connectorIdGenerator;
- private boolean atmosphereAvailable = checkAtmosphereSupport();
+ private Boolean atmosphereAvailable = null;
/**
* Keeps track of whether a warning about missing push support has already
@@ -1853,7 +1853,7 @@ public abstract class VaadinService implements Serializable {
* is not available.
*/
public boolean ensurePushAvailable() {
- if (atmosphereAvailable) {
+ if (isAtmosphereAvailable()) {
return true;
} else {
if (!pushWarningEmitted) {
@@ -1865,7 +1865,7 @@ public abstract class VaadinService implements Serializable {
}
}
- private static boolean checkAtmosphereSupport() {
+ private boolean checkAtmosphereSupport() {
String rawVersion = AtmospherePushConnection.getAtmosphereVersion();
if (rawVersion == null) {
return false;
@@ -1888,6 +1888,9 @@ public abstract class VaadinService implements Serializable {
* @return true if Atmosphere is available, false otherwise
*/
protected boolean isAtmosphereAvailable() {
+ if (atmosphereAvailable == null) {
+ atmosphereAvailable = checkAtmosphereSupport();
+ }
return atmosphereAvailable;
}