diff options
Diffstat (limited to 'server')
3 files changed, 9 insertions, 24 deletions
diff --git a/server/src/main/java/com/vaadin/server/VaadinService.java b/server/src/main/java/com/vaadin/server/VaadinService.java index 75124aa6ef..e453332f02 100644 --- a/server/src/main/java/com/vaadin/server/VaadinService.java +++ b/server/src/main/java/com/vaadin/server/VaadinService.java @@ -1365,20 +1365,6 @@ public abstract class VaadinService implements Serializable { final long duration = (System.nanoTime() - (Long) request .getAttribute(REQUEST_START_TIME_ATTRIBUTE)) / 1000000; session.setLastRequestDuration(duration); - - // Check that connector tracker is in a consistent state here to - // avoid doing it multiple times for a single request - for (UI ui : session.getUIs()) { - try { - ui.getConnectorTracker().ensureCleanedAndConsistent(); - } catch (AssertionError e) { - getLogger().log(Level.SEVERE, - "Error cleaning ConnectionTracker", e); - } catch (Exception e) { - getLogger().log(Level.SEVERE, - "Error cleaning ConnectionTracker", e); - } - } } finally { session.unlock(); } diff --git a/server/src/main/java/com/vaadin/server/VaadinSession.java b/server/src/main/java/com/vaadin/server/VaadinSession.java index f4ebc06335..7014a5f1f5 100644 --- a/server/src/main/java/com/vaadin/server/VaadinSession.java +++ b/server/src/main/java/com/vaadin/server/VaadinSession.java @@ -1009,6 +1009,11 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { "Exception while cleaning connector map for ui " + ui.getUIId(), e); + } catch (AssertionError e) { + getLogger().log(Level.SEVERE, + "Exception while cleaning connector map for ui " + + ui.getUIId(), + e); } } } diff --git a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java index 043c1174fb..d2b9b65764 100644 --- a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java @@ -272,17 +272,7 @@ public class ConnectorTracker implements Serializable { } cleanStreamVariables(); - } - /** - * Performs expensive checks to ensure that the connector tracker is cleaned - * properly and in a consistent state. - * <p> - * This should only be called by the framework. - * - * @since - */ - public void ensureCleanedAndConsistent() { // Do this expensive check only with assertions enabled assert isHierarchyComplete() : "The connector hierarchy is corrupted. " + "Check for missing calls to super.setParent(), super.attach() and super.detach() " @@ -315,6 +305,10 @@ public class ConnectorTracker implements Serializable { } else if (!uninitializedConnectors.contains(connector) && !LegacyCommunicationManager .isConnectorVisibleToClient(connector)) { + // Connector was visible to the client but is no longer (e.g. + // setVisible(false) has been called or SelectiveRenderer tells + // it's no longer shown) -> make sure that the full state is + // sent again when/if made visible uninitializedConnectors.add(connector); diffStates.remove(connector); assert isRemovalSentToClient(connector) : "Connector " |