Getting rid of some invokeBoolean calls

These couldn't be automatically converted. I've changed them to lambdas.


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

Branch: refs/heads/feature/GEODE-866
Commit: 82de4d23f856c04291ef7f3b51671cadb88079dd
Parents: ce74e97
Author: Dan Smith <upthewatersp...@apache.org>
Authored: Thu Feb 11 11:24:44 2016 -0800
Committer: Dan Smith <upthewatersp...@apache.org>
Committed: Tue Feb 16 14:08:40 2016 -0800

----------------------------------------------------------------------
 .../com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java  | 4 +---
 .../gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java | 8 +++-----
 2 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82de4d23/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
 
b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
index 955b24f..5f9450b 100644
--- 
a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
+++ 
b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
@@ -237,9 +237,7 @@ public class ClearMultiVmDUnitTest extends 
DistributedTestCase{
         objArr[0] = ""+i;
         vm1.invoke(ClearMultiVmDUnitTest.class, "getMethod", objArr);
         
-        Object ob[] = new Object[1];
-        ob[0] = "secondVM";
-        boolean val = vm1.invokeBoolean(ClearMultiVmDUnitTest.class, 
"containsValueMethod", ob);
+        boolean val = vm1.invoke(() -> containsValueMethod("secondVM"));
         assertEquals(true, val);
         
     }//end of testClearMultiVM

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82de4d23/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
 
b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
index 1b3cd97..cf6226d 100644
--- 
a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
+++ 
b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
@@ -191,7 +191,7 @@ public class DistAckMapMethodsDUnitTest extends 
DistributedTestCase{
         vm0.invoke(DistAckMapMethodsDUnitTest.class, "putMethod", objArr);
         vm0.invoke(DistAckMapMethodsDUnitTest.class, "removeMethod", objArr);
         //validate if vm0 has that key value entry
-        ret = vm0.invokeBoolean(DistAckMapMethodsDUnitTest.class, 
"containsKeyMethod", objArr);
+        ret = vm0.invoke(() -> containsKeyMethod("" + i));
         if( ret ){//if returned true means that the key is still there
             fail("region.remove failed with distributed ack scope");
         }
@@ -268,15 +268,13 @@ public class DistAckMapMethodsDUnitTest extends 
DistributedTestCase{
         //Integer in = new Integer(i);
         //objArr[0] = (Object) in;
         vm0.invoke(DistAckMapMethodsDUnitTest.class, "putMethod", objArr);
-        Object ob[] = new Object[1];
-        ob[0] = "first";
-        boolean val = vm1.invokeBoolean(DistAckMapMethodsDUnitTest.class, 
"containsValueMethod", ob);
+        boolean val = vm1.invoke(() -> containsValueMethod("first"));
         if (val){//val should be false.
             fail("Failed in region.ContainsValue");
         }
         
         vm1.invoke(DistAckMapMethodsDUnitTest.class, "getMethod", objArr);
-        boolean val1 = vm1.invokeBoolean(DistAckMapMethodsDUnitTest.class, 
"containsValueMethod", ob);
+        boolean val1 = vm1.invoke(() -> containsValueMethod("first"));
         if (!val1){//val1 should be true.
             fail("Failed in region.ContainsValue");
         }

Reply via email to