summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2014-06-25 13:50:14 +0300
committerLeif Åstrand <leif@vaadin.com>2014-06-25 13:50:14 +0300
commit087bf4215b76107d0b4e4c70e678ad7201270b12 (patch)
tree91c1ad106917e54f99d91e5a116526122003284b /client
parentf846f8d699ad6f599d91f7f86aa419be9b22b5a8 (diff)
downloadvaadin-framework-087bf4215b76107d0b4e4c70e678ad7201270b12.tar.gz
vaadin-framework-087bf4215b76107d0b4e4c70e678ad7201270b12.zip
Don't complain about missing sync id for critical notifications (#14081)
Change-Id: I351d256230a5cd674a5e1b8066d3e2aef07ff3bf
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index 5d696f1ddb..8bc43dda9a 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -66,6 +66,7 @@ import com.google.gwt.user.client.Window.ClosingHandler;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.ApplicationConfiguration.ErrorMessage;
+import com.vaadin.client.ApplicationConnection.ApplicationStoppedEvent;
import com.vaadin.client.ResourceLoader.ResourceLoadEvent;
import com.vaadin.client.ResourceLoader.ResourceLoadListener;
import com.vaadin.client.communication.HasJavaScriptConnectorHelper;
@@ -1431,10 +1432,16 @@ public class ApplicationConnection implements HasHandlers {
if (json.containsKey(ApplicationConstants.SERVER_SYNC_ID)) {
int syncId = json.getInt(ApplicationConstants.SERVER_SYNC_ID);
- assert (lastSeenServerSyncId == UNDEFINED_SYNC_ID || syncId == lastSeenServerSyncId + 1) : "Newly retrieved server sync id was not exactly one larger than the previous one (new: "
- + syncId + ", last seen: " + lastSeenServerSyncId + ")";
+ /*
+ * Use sync id unless explicitly set as undefined, as is done by
+ * e.g. critical server-side notifications
+ */
+ if (syncId != -1) {
+ assert (lastSeenServerSyncId == UNDEFINED_SYNC_ID || syncId == lastSeenServerSyncId + 1) : "Newly retrieved server sync id was not exactly one larger than the previous one (new: "
+ + syncId + ", last seen: " + lastSeenServerSyncId + ")";
- lastSeenServerSyncId = syncId;
+ lastSeenServerSyncId = syncId;
+ }
} else {
VConsole.error("Server response didn't contain a sync id. "
+ "Please verify that the server is up-to-date and that the response data has not been modified in transmission.");