# IGNITE-143 - Fixing tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8230c8c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8230c8c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8230c8c7 Branch: refs/heads/ignite-143 Commit: 8230c8c740645d3f3046e9ff176b5dc70382f0d3 Parents: 8178340 Author: Valentin Kulichenko <vkuliche...@gridgain.com> Authored: Thu Feb 12 18:10:46 2015 -0800 Committer: Valentin Kulichenko <vkuliche...@gridgain.com> Committed: Thu Feb 12 18:10:46 2015 -0800 ---------------------------------------------------------------------- .../continuous/CacheContinuousQueryManager.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8230c8c7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java index 05f7e0d..bebac13 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java @@ -125,6 +125,14 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K assert e != null; assert key != null; + boolean hasNewVal = newVal != null || (newBytes != null && !newBytes.isNull()); + boolean hasOldVal = oldVal != null || (oldBytes != null && !oldBytes.isNull()); + + if (!hasNewVal && !hasOldVal) + return; + + EventType evtType = !hasNewVal ? REMOVED : !hasOldVal ? CREATED : UPDATED; + ConcurrentMap<UUID, CacheContinuousQueryListener<K, V>> lsnrCol; if (e.isInternal()) @@ -135,13 +143,6 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K if (F.isEmpty(lsnrCol)) return; - boolean hasNewVal = newVal != null || (newBytes != null && !newBytes.isNull()); - boolean hasOldVal = oldVal != null || (oldBytes != null && !oldBytes.isNull()); - - assert hasNewVal || hasOldVal; - - EventType evtType = !hasNewVal ? REMOVED : !hasOldVal ? CREATED : UPDATED; - boolean initialized = false; boolean primary = cctx.affinity().primary(cctx.localNode(), key, -1);