geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [44/50] [abbrv] incubator-geode git commit: GEODE-2007: fix unchecked warnings
Date Wed, 19 Oct 2016 20:00:12 GMT
GEODE-2007: fix unchecked warnings


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

Branch: refs/heads/feature/GEODE-1874
Commit: a53c4b1509867a1847b8a21ef8b926911f874bb1
Parents: 7330733
Author: Kirk Lund <klund@apache.org>
Authored: Mon Oct 17 12:49:00 2016 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Mon Oct 17 16:30:19 2016 -0700

----------------------------------------------------------------------
 .../apache/geode/modules/session/catalina/DeltaSession7.java  | 3 +--
 .../modules/session/Tomcat8SessionsClientServerDUnitTest.java | 3 ++-
 .../org/apache/geode/internal/cache/GemFireCacheImpl.java     | 2 +-
 .../org/apache/geode/internal/cache/ha/HARegionQueue.java     | 7 ++++---
 .../cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java   | 4 ++--
 .../test/java/org/apache/geode/OldClientSupportDUnitTest.java | 4 ++--
 6 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a53c4b15/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
b/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
index 0df05ff..c0dfe23 100644
--- a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
+++ b/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
@@ -535,8 +535,7 @@ public class DeltaSession7 extends StandardSession implements DataSerializable,
     }
   }
 
-  @SuppressWarnings({"unchecked", "rawtypes"})
-  protected ConcurrentMap readInAttributes(final DataInput in) throws IOException, ClassNotFoundException
{
+  protected ConcurrentMap<String, Object> readInAttributes(final DataInput in) throws
IOException, ClassNotFoundException {
     return DataSerializer.readObject(in);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a53c4b15/extensions/geode-modules-tomcat8/src/test/java/org/apache/geode/modules/session/Tomcat8SessionsClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat8/src/test/java/org/apache/geode/modules/session/Tomcat8SessionsClientServerDUnitTest.java
b/extensions/geode-modules-tomcat8/src/test/java/org/apache/geode/modules/session/Tomcat8SessionsClientServerDUnitTest.java
index 8b29048..384689e 100644
--- a/extensions/geode-modules-tomcat8/src/test/java/org/apache/geode/modules/session/Tomcat8SessionsClientServerDUnitTest.java
+++ b/extensions/geode-modules-tomcat8/src/test/java/org/apache/geode/modules/session/Tomcat8SessionsClientServerDUnitTest.java
@@ -19,6 +19,7 @@ package org.apache.geode.modules.session;
 import static org.apache.geode.distributed.ConfigurationProperties.*;
 import static org.apache.geode.internal.cache.CacheServerLauncher.serverPort;
 
+import java.util.List;
 import java.util.Properties;
 
 import org.junit.experimental.categories.Category;
@@ -49,7 +50,7 @@ public class Tomcat8SessionsClientServerDUnitTest extends TestSessionsTomcat8Bas
   @Override
   public void preTearDown() {
     vm0.invoke(() -> {
-      GemFireCacheImpl.getInstance().getCacheServers().forEach(e -> ((CacheServer)e).stop());
+      (GemFireCacheImpl.getInstance().getCacheServers()).forEach(cacheServer -> cacheServer.stop());
     });
     server.stopContainer();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a53c4b15/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 6c195e7..f673ded 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -4015,7 +4015,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache,
HasCachePer
     }
   }
 
-  public List getCacheServers() {
+  public List<CacheServer> getCacheServers() {
     List cacheServersWithoutReceiver = null;
     if (!allCacheServers.isEmpty()) {
     Iterator allCacheServersIterator = allCacheServers.iterator();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a53c4b15/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
index 027a1b5..f2b1185 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java
@@ -22,6 +22,7 @@ import org.apache.geode.cache.TimeoutException;
 import org.apache.geode.cache.query.internal.CqQueryVsdStats;
 import org.apache.geode.cache.query.internal.cq.CqService;
 import org.apache.geode.cache.query.internal.cq.InternalCqQuery;
+import org.apache.geode.cache.server.CacheServer;
 import org.apache.geode.cache.util.CacheListenerAdapter;
 import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.distributed.internal.DM;
@@ -2987,10 +2988,10 @@ protected boolean checkEventForRemoval(Long counter, ThreadIdentifier
threadid,
                 && !queueRemovalMessageList.isEmpty()) { // messages exist
               QueueRemovalMessage qrm = new QueueRemovalMessage();
               qrm.resetRecipients();
-              List<CacheServerImpl> servers = this.cache.getCacheServers();
+              List<CacheServer> servers = this.cache.getCacheServers();
               List<DistributedMember> recipients = new LinkedList();
-              for (CacheServerImpl server: servers) {
-                recipients.addAll(server.getCacheServerAdvisor().adviseBridgeServers());
+              for (CacheServer server: servers) {
+                recipients.addAll(CacheServerImpl.class.cast(server).getCacheServerAdvisor().adviseBridgeServers());
               }
               qrm.setRecipients(recipients);
               qrm.setMessagesList(queueRemovalMessageList);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a53c4b15/geode-cq/src/test/java/org/apache/geode/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/org/apache/geode/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
b/geode-cq/src/test/java/org/apache/geode/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
index 3990265..119b382 100644
--- a/geode-cq/src/test/java/org/apache/geode/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
@@ -200,10 +200,10 @@ public class DeltaPropagationWithCQDUnitTest extends JUnit4DistributedTestCase
{
 
   public static void verifyFullValueRequestsFromClients(Long expected)
       throws Exception {
-    List<CacheServerImpl> servers = ((GemFireCacheImpl)cache).getCacheServers();
+    List<CacheServer> servers = ((GemFireCacheImpl)cache).getCacheServers();
     assertEquals("expected one server but found these: " + servers, 1, servers.size());
 
-    CacheClientProxy[] proxies = servers.get(0).getAcceptor().getCacheClientNotifier()
+    CacheClientProxy[] proxies = CacheServerImpl.class.cast(servers.get(0)).getAcceptor().getCacheClientNotifier()
         .getClientProxies().toArray(new CacheClientProxy[0]);
     
     // find the proxy for the client that processed the CQs - it will have

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a53c4b15/geode-old-client-support/src/test/java/org/apache/geode/OldClientSupportDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-old-client-support/src/test/java/org/apache/geode/OldClientSupportDUnitTest.java
b/geode-old-client-support/src/test/java/org/apache/geode/OldClientSupportDUnitTest.java
index 0b48e16..36d13b5 100644
--- a/geode-old-client-support/src/test/java/org/apache/geode/OldClientSupportDUnitTest.java
+++ b/geode-old-client-support/src/test/java/org/apache/geode/OldClientSupportDUnitTest.java
@@ -102,8 +102,8 @@ public class OldClientSupportDUnitTest extends JUnit4CacheTestCase {
     }
   }
   
-  private Object instantiate(Class aClass) throws Exception {
-    Constructor c = null;
+  private Object instantiate(Class<?> aClass) throws Exception {
+    Constructor<?> c = null;
     try {
       c = aClass.getConstructor();
       return c.newInstance();


Mime
View raw message