浏览代码

Make checkAtmosphereSupport() non-static (#12136)

Cherry pick https://github.com/vaadin/framework/pull/12131
tags/7.7.24
Tatu Lund 3 年前
父节点
当前提交
46ecb27caf
没有帐户链接到提交者的电子邮件

+ 6
- 3
server/src/main/java/com/vaadin/server/VaadinService.java 查看文件

@@ -134,7 +134,7 @@ public abstract class VaadinService implements Serializable {

private Iterable<RequestHandler> requestHandlers;

private boolean atmosphereAvailable = checkAtmosphereSupport();
private Boolean atmosphereAvailable = null;

/**
* Keeps track of whether a warning about missing push support has already
@@ -1652,7 +1652,7 @@ public abstract class VaadinService implements Serializable {
* is not available.
*/
public boolean ensurePushAvailable() {
if (atmosphereAvailable) {
if (isAtmosphereAvailable()) {
return true;
} else {
if (!pushWarningEmitted) {
@@ -1664,7 +1664,7 @@ public abstract class VaadinService implements Serializable {
}
}

private static boolean checkAtmosphereSupport() {
private boolean checkAtmosphereSupport() {
String rawVersion = AtmospherePushConnection.getAtmosphereVersion();
if (rawVersion == null) {
return false;
@@ -1687,6 +1687,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;
}


+ 1
- 1
uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java 查看文件

@@ -25,7 +25,7 @@ public class VerifyBrowserVersionTest extends MultiBrowserTest {
// Chrome version does not necessarily match the desired version
// because of auto updates...
browserIdentifier = getExpectedUserAgentString(
getDesiredCapabilities()) + "86";
getDesiredCapabilities()) + "87";
} else {
browserIdentifier = getExpectedUserAgentString(desiredCapabilities)
+ desiredCapabilities.getVersion();

正在加载...
取消
保存