Misc cleanup due to stricter type checking

Fixing various issues being checked by the compiler:
 - Changing generics to match callers
 - Calling invoke on the correct class
 - Fixing some ambiguous casts.
 - Fixing some method visibility issues.
 - Removing extra comma after parameters


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

Branch: refs/heads/feature/GEODE-866
Commit: 51c03a91750dbd547fbb7db311a7bd19ed6f90aa
Parents: 82de4d2
Author: Dan Smith <upthewatersp...@apache.org>
Authored: Wed Feb 10 16:52:22 2016 -0800
Committer: Dan Smith <upthewatersp...@apache.org>
Committed: Tue Feb 16 14:08:40 2016 -0800

----------------------------------------------------------------------
 .../gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java   | 2 +-
 .../cache/tier/sockets/DurableRegistrationDUnitTest.java         | 2 +-
 .../tier/sockets/VerifyEventIDGenerationInP2PDUnitTest.java      | 2 +-
 .../management/UniversalMembershipListenerAdapterDUnitTest.java  | 4 ++--
 .../java/com/gemstone/gemfire/test/dunit/tests/VMDUnitTest.java  | 4 ++--
 .../gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java  | 2 +-
 .../cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java  | 2 +-
 .../gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java   | 2 +-
 .../com/gemstone/gemfire/internal/cache/wan/WANTestBase.java     | 4 ++--
 9 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51c03a91/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
----------------------------------------------------------------------
diff --git 
a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
 
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
index 4c1c896..46e1679 100644
--- 
a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
+++ 
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
@@ -75,7 +75,7 @@ public class Bug37805DUnitTest extends DistributedTestCase{
   public void testFunctionality() {
  // Step 1: Starting the servers
 
-    PORT1 = ((Integer)this.server1VM.invoke(() -> 
CacheServerTestUtil.createCacheServer( regionName, new Boolean(true),
+    PORT1 = ((Integer)this.server1VM.invoke(() -> 
CacheServerTestUtil.createCacheServer( regionName, new Boolean(true)
             ))).intValue();
     final int durableClientTimeout = 600; 
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51c03a91/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
 
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
index 683ec03..5d5e0a8 100644
--- 
a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
+++ 
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
@@ -115,7 +115,7 @@ public class DurableRegistrationDUnitTest extends 
DistributedTestCase {
     // Step 1: Starting the servers
     PORT1 = ((Integer)this.server1VM.invoke(() -> 
CacheServerTestUtil.createCacheServer( regionName, new Boolean(true)
             ))).intValue();
-    PORT2 = ((Integer)this.server2VM.invoke(() -> 
CacheServerTestUtil.createCacheServer( regionName, new Boolean(true),
+    PORT2 = ((Integer)this.server2VM.invoke(() -> 
CacheServerTestUtil.createCacheServer( regionName, new Boolean(true)
             ))).intValue();
 
     // Step 2: Bring Up the Client

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51c03a91/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyEventIDGenerationInP2PDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyEventIDGenerationInP2PDUnitTest.java
 
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyEventIDGenerationInP2PDUnitTest.java
index 4934a9d..5287c9f 100755
--- 
a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyEventIDGenerationInP2PDUnitTest.java
+++ 
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyEventIDGenerationInP2PDUnitTest.java
@@ -118,7 +118,7 @@ public class VerifyEventIDGenerationInP2PDUnitTest extends 
DistributedTestCase
       public void afterCreate(EntryEvent event)
       {
         if (!receiver) {
-          vm0.invoke(() -> EventIDVerificationInP2PDUnitTest.setEventIDData( 
((EntryEventImpl)event).getEventId() ));
+          vm0.invoke(() -> 
VerifyEventIDGenerationInP2PDUnitTest.setEventIDData( 
((EntryEventImpl)event).getEventId() ));
         }
         else {
           testEventIDResult = ((EntryEventImpl)event).getEventId().equals(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51c03a91/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
 
b/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
index fcb1e22..394a155 100644
--- 
a/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
+++ 
b/gemfire-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
@@ -1861,7 +1861,7 @@ public class UniversalMembershipListenerAdapterDUnitTest 
extends ClientServerTes
     
     // gather details for later creation of pool...
     assertEquals(ports[0],
-                 vm0.invoke(() -> 
UniversalMembershipListenerAdapterDUnitTest.getTestServerEventsInLonerClient_port()));
+                 (int) vm0.invoke(() -> 
UniversalMembershipListenerAdapterDUnitTest.getTestServerEventsInLonerClient_port()));
     String serverMemberId = (String) vm0.invoke(() -> 
UniversalMembershipListenerAdapterDUnitTest.getMemberId());
     DistributedMember serverMember = (DistributedMember) vm0.invoke(() -> 
UniversalMembershipListenerAdapterDUnitTest.getDistributedMember());
 
@@ -2029,7 +2029,7 @@ public class UniversalMembershipListenerAdapterDUnitTest 
extends ClientServerTes
     
     // gather details for later creation of pool...
     assertEquals(ports[0],
-                 vm0.invoke(() -> 
UniversalMembershipListenerAdapterDUnitTest.getTestServerEventsInLonerClient_port()));
+        (int) vm0.invoke(() -> 
UniversalMembershipListenerAdapterDUnitTest.getTestServerEventsInLonerClient_port()));
     serverMemberId = (String) vm0.invoke(() -> 
UniversalMembershipListenerAdapterDUnitTest.getMemberId());
     serverMember = (DistributedMember) vm0.invoke(() -> 
UniversalMembershipListenerAdapterDUnitTest.getDistributedMember());
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51c03a91/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/VMDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/VMDUnitTest.java
 
b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/VMDUnitTest.java
index 26a67c8..ce6cb36 100644
--- 
a/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/VMDUnitTest.java
+++ 
b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/VMDUnitTest.java
@@ -52,7 +52,7 @@ public class VMDUnitTest extends DistributedTestCase {
     Host host = Host.getHost(0);
     VM vm = host.getVM(0);
     assertEquals(BOOLEAN_VALUE,
-                 vm.invoke(() -> VMDUnitTest.remoteBooleanMethod())); 
+                 (boolean) vm.invoke(() -> 
VMDUnitTest.remoteBooleanMethod())); 
   }
 
   /**
@@ -79,7 +79,7 @@ public class VMDUnitTest extends DistributedTestCase {
     Host host = Host.getHost(0);
     VM vm = host.getVM(0);
     assertEquals(LONG_VALUE,
-                 vm.invoke(() -> VMDUnitTest.remoteLongMethod())); 
+                 (long) vm.invoke(() -> VMDUnitTest.remoteLongMethod())); 
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51c03a91/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
 
b/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
index bc0121b..9730395 100644
--- 
a/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
+++ 
b/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
@@ -187,7 +187,7 @@ public class CqQueryDUnitTest extends CacheTestCase {
   }
   
   /* Returns Cache Server Port */
-  static int getCacheServerPort() {
+  public static int getCacheServerPort() {
     return bridgeServerPort;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51c03a91/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
 
b/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
index ca506fa..9363117 100644
--- 
a/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
+++ 
b/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
@@ -1691,7 +1691,7 @@ public class PartitionedRegionCqQueryDUnitTest extends 
CacheTestCase {
   } 
   
   /* Returs Cache Server Port */
-  private static int getCacheServerPort() {
+  protected static int getCacheServerPort() {
     return bridgeServerPort;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51c03a91/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
----------------------------------------------------------------------
diff --git 
a/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
 
b/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
index f99a316..7fa5077 100755
--- 
a/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
+++ 
b/gemfire-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
@@ -74,7 +74,7 @@ public abstract class PdxQueryCQTestBase extends 
CacheTestCase {
       "SELECT p FROM " + regName + " p, p.idTickers idTickers WHERE p.ticker = 
'vmware'", // 4
     };
 
-  private static int getCacheServerPort() {
+  protected static int getCacheServerPort() {
     return bridgeServerPort;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51c03a91/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------
diff --git 
a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
 
b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
index 272c79c..c78de26 100644
--- 
a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
+++ 
b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
@@ -4256,7 +4256,7 @@ public class WANTestBase extends DistributedTestCase{
   }
   
   public static void checkAllSiteMetaData(     
-      Map<Integer, List<Integer>> dsVsPorts) {
+      Map<Integer, ArrayList<Integer>> dsVsPorts) {
     waitForSitesToUpdate();
     assertNotNull(system);
 //    Map<Integer,Set<DistributionLocatorId>> allSiteMetaData = 
((DistributionConfigImpl)system
@@ -4270,7 +4270,7 @@ public class WANTestBase extends DistributedTestCase{
     System.out.println("Server allSiteMetaData : " + 
((InternalLocator)locator).getlocatorMembershipListener().getAllServerLocatorsInfo());
     
     //assertEquals(dsVsPorts.size(), allSiteMetaData.size());
-    for (Map.Entry<Integer, List<Integer>> entry : dsVsPorts.entrySet()) {
+    for (Map.Entry<Integer, ArrayList<Integer>> entry : dsVsPorts.entrySet()) {
       Set<DistributionLocatorId> locators = 
allSiteMetaData.get(entry.getKey());
       assertNotNull(locators);
       List<Integer> value = entry.getValue();

Reply via email to