ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject incubator-ignite git commit: revert try with resources
Date Sun, 22 Mar 2015 07:00:43 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45 658b82342 -> 5f3c90b32


revert try with resources


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5f3c90b3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5f3c90b3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5f3c90b3

Branch: refs/heads/ignite-45
Commit: 5f3c90b325c15f84a97388e1918a887368c4bb69
Parents: 658b823
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Sun Mar 22 10:00:37 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Sun Mar 22 10:00:37 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/cache/CacheManager.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f3c90b3/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
index fc43d2a..4a41dd5 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
@@ -257,7 +257,11 @@ public class CacheManager implements javax.cache.CacheManager {
     @Override public void destroyCache(String cacheName) {
         kernalGateway.readLock();
 
-        try (IgniteCache<?, ?> cache = getCache0(cacheName)) {
+        IgniteCache<?, ?> cache;
+
+        try {
+            cache = getCache0(cacheName);
+
             if (cache != null) {
                 unregisterCacheObject(cacheName, CACHE_CONFIGURATION);
                 unregisterCacheObject(cacheName, CACHE_STATISTICS);
@@ -266,6 +270,9 @@ public class CacheManager implements javax.cache.CacheManager {
         finally {
             kernalGateway.readUnlock();
         }
+
+        if (cache != null)
+            cache.close();
     }
 
     /**


Mime
View raw message