You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2016/12/30 12:02:39 UTC
ignite git commit: Fixed NPE in CacheContinuousQueryHandler.
Repository: ignite
Updated Branches:
refs/heads/ignite-3477 f167a58ee -> 5475bfda2
Fixed NPE in CacheContinuousQueryHandler.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5475bfda
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5475bfda
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5475bfda
Branch: refs/heads/ignite-3477
Commit: 5475bfda2b06feaa80e9060dfcd87f6cb819d20f
Parents: f167a58
Author: sboikov <sb...@gridgain.com>
Authored: Fri Dec 30 15:02:37 2016 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Dec 30 15:02:37 2016 +0300
----------------------------------------------------------------------
.../continuous/CacheContinuousQueryHandler.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5475bfda/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 5fd26a9..ea5551d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -166,7 +166,7 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
private transient boolean ignoreClsNotFound;
/** */
- private transient boolean asyncCallback;
+ private transient boolean asyncCb;
/** */
private transient UUID nodeId;
@@ -308,12 +308,12 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
if (locLsnr instanceof JCacheQueryLocalListener) {
ctx.resource().injectGeneric(((JCacheQueryLocalListener)locLsnr).impl);
- asyncCallback = ((JCacheQueryLocalListener)locLsnr).async();
+ asyncCb = ((JCacheQueryLocalListener)locLsnr).async();
}
else {
ctx.resource().injectGeneric(locLsnr);
- asyncCallback = U.hasAnnotation(locLsnr, IgniteAsyncCallback.class);
+ asyncCb = U.hasAnnotation(locLsnr, IgniteAsyncCallback.class);
}
}
@@ -324,14 +324,14 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
if (((JCacheQueryRemoteFilter)filter).impl != null)
ctx.resource().injectGeneric(((JCacheQueryRemoteFilter)filter).impl);
- if (!asyncCallback)
- asyncCallback = ((JCacheQueryRemoteFilter)filter).async();
+ if (!asyncCb)
+ asyncCb = ((JCacheQueryRemoteFilter)filter).async();
}
else {
ctx.resource().injectGeneric(filter);
- if (!asyncCallback)
- asyncCallback = U.hasAnnotation(filter, IgniteAsyncCallback.class);
+ if (!asyncCb)
+ asyncCb = U.hasAnnotation(filter, IgniteAsyncCallback.class);
}
}
@@ -396,7 +396,7 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
// skipPrimaryCheck is set only when listen locally for replicated cache events.
assert !skipPrimaryCheck || (cctx.isReplicated() && ctx.localNodeId().equals(nodeId));
- if (asyncCallback) {
+ if (asyncCb) {
ContinuousQueryAsyncClosure clsr = new ContinuousQueryAsyncClosure(
primary,
evt,
@@ -599,7 +599,7 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
if (objs.isEmpty())
return;
- if (asyncCallback) {
+ if (asyncCb) {
final List<CacheContinuousQueryEntry> entries = objs instanceof List ? (List)objs : new ArrayList(objs);
IgniteStripedThreadPoolExecutor asyncPool = ctx.asyncCallbackPool();
@@ -876,7 +876,7 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
partCntrs = initUpdCntrs.get(partId);
}
- rec = new PartitionRecovery(ctx.log(getClass()), initTopVer0, partCntrs.get2());
+ rec = new PartitionRecovery(ctx.log(getClass()), initTopVer0, partCntrs != null ? partCntrs.get2() : null);
PartitionRecovery oldRec = rcvs.putIfAbsent(partId, rec);