ignite-2.0 - Fixed NPE
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a4d91484 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a4d91484 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a4d91484 Branch: refs/heads/ignite-5024 Commit: a4d91484384ff2e0323fa9375083621e87d2f5e2 Parents: 32379ee Author: Alexander Paschenko <[email protected]> Authored: Fri Apr 21 18:41:27 2017 +0300 Committer: Alexey Goncharuk <[email protected]> Committed: Fri Apr 21 18:41:27 2017 +0300 ---------------------------------------------------------------------- .../ignite/internal/processors/query/GridQueryProcessor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/a4d91484/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java index 0ac55e6..015646d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java @@ -1272,7 +1272,8 @@ public class GridQueryProcessor extends GridProcessorAdapter { private void registerCache0(String space, GridCacheContext<?, ?> cctx, Collection<QueryTypeCandidate> cands) throws IgniteCheckedException { synchronized (stateMux) { - idx.registerCache(space, cctx, cctx.config()); + if (idx != null) + idx.registerCache(space, cctx, cctx.config()); try { for (QueryTypeCandidate cand : cands) { @@ -1301,7 +1302,8 @@ public class GridQueryProcessor extends GridProcessorAdapter { } } - idx.registerType(space, desc); + if (idx != null) + idx.registerType(space, desc); } spaces.add(CU.mask(space));
