Updated Branches: refs/heads/master a5421ec48 -> bef99f313
WICKET-4879: null check for the resource Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/bef99f31 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/bef99f31 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/bef99f31 Branch: refs/heads/master Commit: bef99f3135ee545d11cfad41733a1c6a82f54dfb Parents: a5421ec Author: Emond Papegaaij <papega...@apache.org> Authored: Mon Nov 26 22:04:06 2012 +0100 Committer: Emond Papegaaij <papega...@apache.org> Committed: Mon Nov 26 22:04:06 2012 +0100 ---------------------------------------------------------------------- .../org/apache/wicket/atmosphere/EventBus.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/bef99f31/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventBus.java ---------------------------------------------------------------------- diff --git a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventBus.java b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventBus.java index f8efd06..4901c7a 100644 --- a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventBus.java +++ b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventBus.java @@ -185,14 +185,19 @@ public class EventBus implements UnboundListener /** * Post an event to a single resource. This will invoke the event handlers on all components on * the page with the suspended connection. The resulting AJAX update (if any) is pushed to the - * client. You can find the UUID via {@link AtmosphereBehavior#getUUID(Page)}. + * client. You can find the UUID via {@link AtmosphereBehavior#getUUID(Page)}. If no resource + * exists with the given UUID, no post is performed. * * @param event * @param resourceUuid */ public void post(Object event, String resourceUuid) { - post(event, AtmosphereResourceFactory.getDefault().find(resourceUuid)); + AtmosphereResource resource = AtmosphereResourceFactory.getDefault().find(resourceUuid); + if (resource != null) + { + post(event, resource); + } } /**