You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2017/04/20 21:16:58 UTC

[4/4] geode git commit: 2632: 1st pass cleaning up GemFireCacheImpl

2632: 1st pass cleaning up GemFireCacheImpl

* remove dead-code
* add @Override annotations
* remove uselss javadocs and comments
* reduce scope of constants/vars/methods where possible
* fix misc IDE warnings


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/9abb3373
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/9abb3373
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/9abb3373

Branch: refs/heads/feature/GEODE-2632-6
Commit: 9abb33737844173f361549ff4e22f43344b36fba
Parents: 5891ed7
Author: Kirk Lund <kl...@apache.org>
Authored: Thu Apr 20 10:43:04 2017 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Thu Apr 20 14:16:46 2017 -0700

----------------------------------------------------------------------
 .../geode/cache/client/internal/ProxyCache.java |   16 +-
 .../geode/internal/cache/GemFireCacheImpl.java  | 1009 ++++++------------
 .../geode/internal/cache/InternalCache.java     |    2 +-
 .../internal/cache/xmlcache/CacheCreation.java  |    2 +-
 .../internal/beans/MemberMBeanBridge.java       |    7 +-
 .../test/java/org/apache/geode/TXJUnitTest.java |    4 +-
 .../java/org/apache/geode/TXWriterTestCase.java |   69 +-
 .../geode/disttx/DistTXWriterJUnitTest.java     |   20 +-
 .../geode/disttx/DistTXWriterOOMEJUnitTest.java |   25 +-
 .../geode/internal/cache/PRTXJUnitTest.java     |   76 +-
 10 files changed, 452 insertions(+), 778 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/9abb3373/geode-core/src/main/java/org/apache/geode/cache/client/internal/ProxyCache.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/client/internal/ProxyCache.java b/geode-core/src/main/java/org/apache/geode/cache/client/internal/ProxyCache.java
index 76306f5..77aaccd 100755
--- a/geode-core/src/main/java/org/apache/geode/cache/client/internal/ProxyCache.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/client/internal/ProxyCache.java
@@ -221,19 +221,13 @@ public class ProxyCache implements RegionService {
     return this.stopper;
   }
 
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.geode.cache.RegionService#rootRegions()
-   */
+  @Override
   public Set<Region<?, ?>> rootRegions() {
     preOp();
-    Set<Region<?, ?>> rRegions = new HashSet<Region<?, ?>>();
-    Iterator<LocalRegion> it = this.cache.rootRegions().iterator();
-    while (it.hasNext()) {
-      LocalRegion lr = it.next();
-      if (!lr.getAttributes().getDataPolicy().withStorage()) {
-        rRegions.add(new ProxyRegion(this, lr));
+    Set<Region<?, ?>> rRegions = new HashSet<>();
+    for (Region region : this.cache.rootRegions()) {
+      if (!region.getAttributes().getDataPolicy().withStorage()) {
+        rRegions.add(new ProxyRegion(this, region));
       }
     }
     return Collections.unmodifiableSet(rRegions);