zstan commented on a change in pull request #8837:
URL: https://github.com/apache/ignite/pull/8837#discussion_r601151151



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
##########
@@ -2419,11 +2421,15 @@ else if (!(err instanceof NodeStoppingException))
     }
 
     /**
+     * Getting the cache object context.
+     *
      * @param cacheName Cache name.
-     * @return Cache object context.
+     * @return Cache object context, {@code null} if the cache was not found.
      */
-    private CacheObjectContext cacheObjectContext(String cacheName) {
-        return 
ctx.cache().internalCache(cacheName).context().cacheObjectContext();
+    @Nullable private CacheObjectContext cacheObjectContext(String cacheName) {
+        GridCacheAdapter<Object, Object> cache = 
ctx.cache().internalCache(cacheName);
+

Review comment:
       you still can get NPE in code below.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to