geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esh...@apache.org
Subject [geode] branch support/1.13 updated: Fix a build error.
Date Wed, 29 Jul 2020 22:34:32 GMT
This is an automated email from the ASF dual-hosted git repository.

eshu11 pushed a commit to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/support/1.13 by this push:
     new 21d9072  Fix a build error.
21d9072 is described below

commit 21d9072739416b12dd85b066ecc80db6ad904db3
Author: Eric Shu <eshu@pivotal.io>
AuthorDate: Wed Jul 29 15:32:53 2020 -0700

    Fix a build error.
---
 .../org/apache/geode/internal/cache/ha/QueueRemovalMessage.java     | 4 +---
 .../org/apache/geode/internal/cache/ha/QueueRemovalMessageTest.java | 6 +++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/QueueRemovalMessage.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/QueueRemovalMessage.java
index f789411..7d2f2fd 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ha/QueueRemovalMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ha/QueueRemovalMessage.java
@@ -14,8 +14,6 @@
  */
 package org.apache.geode.internal.cache.ha;
 
-import static org.apache.geode.util.internal.UncheckedUtils.uncheckedCast;
-
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -64,7 +62,7 @@ public class QueueRemovalMessage extends PooledDistributionMessage {
    * Set the message list
    */
   void setMessagesList(List messages) {
-    this.messagesList = uncheckedCast(messages);
+    this.messagesList = messages;
   }
 
   /**
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/QueueRemovalMessageTest.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/QueueRemovalMessageTest.java
index 07f99b7..e9bd974 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/QueueRemovalMessageTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/QueueRemovalMessageTest.java
@@ -14,7 +14,6 @@
  */
 package org.apache.geode.internal.cache.ha;
 
-import static org.apache.geode.util.internal.UncheckedUtils.uncheckedCast;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
@@ -61,14 +60,15 @@ public class QueueRemovalMessageTest {
   private final int region2EventSize = 2;
 
   @Before
+  @SuppressWarnings("unchecked")
   public void setup() {
     queueRemovalMessage = spy(new QueueRemovalMessage());
     messagesList = new LinkedList<>();
     queueRemovalMessage.setMessagesList(messagesList);
 
     long maxWaitTimeForInitialization = 30000;
-    when(cache.getRegion(regionName1)).thenReturn(uncheckedCast(region1));
-    when(cache.getRegion(regionName2)).thenReturn(uncheckedCast(region2));
+    when(cache.getRegion(regionName1)).thenReturn(region1);
+    when(cache.getRegion(regionName2)).thenReturn((region2));
     when(region1.getOwnerWithWait(maxWaitTimeForInitialization)).thenReturn(regionQueue1);
     when(region2.getOwnerWithWait(maxWaitTimeForInitialization)).thenReturn(regionQueue2);
     when(regionQueue1.isQueueInitialized()).thenReturn(true);


Mime
View raw message