From 82eaf2e26126d7756a17f3ee2898339004ca7801 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 17 Sep 2021 11:01:46 -0700 Subject: [PATCH] Fix compiler warnings. Optimize imports. --- .../annotation/LocatorApplicationIntegrationTests.java | 8 ++++---- .../json/JSONRegionAdviceIntegrationTests.java | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/spring-data-geode/src/test/java/org/springframework/data/gemfire/config/annotation/LocatorApplicationIntegrationTests.java b/spring-data-geode/src/test/java/org/springframework/data/gemfire/config/annotation/LocatorApplicationIntegrationTests.java index 19c4b09c..345f35c1 100644 --- a/spring-data-geode/src/test/java/org/springframework/data/gemfire/config/annotation/LocatorApplicationIntegrationTests.java +++ b/spring-data-geode/src/test/java/org/springframework/data/gemfire/config/annotation/LocatorApplicationIntegrationTests.java @@ -19,15 +19,15 @@ import static org.assertj.core.api.Assertions.assertThat; import java.util.Properties; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; + import org.apache.geode.cache.Cache; import org.apache.geode.cache.CacheFactory; import org.apache.geode.distributed.DistributedSystem; import org.apache.geode.distributed.Locator; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.gemfire.GemfireUtils; import org.springframework.test.context.junit4.SpringRunner; diff --git a/spring-data-geode/src/test/java/org/springframework/data/gemfire/serialization/json/JSONRegionAdviceIntegrationTests.java b/spring-data-geode/src/test/java/org/springframework/data/gemfire/serialization/json/JSONRegionAdviceIntegrationTests.java index 93e1fffa..a9803184 100644 --- a/spring-data-geode/src/test/java/org/springframework/data/gemfire/serialization/json/JSONRegionAdviceIntegrationTests.java +++ b/spring-data-geode/src/test/java/org/springframework/data/gemfire/serialization/json/JSONRegionAdviceIntegrationTests.java @@ -19,7 +19,6 @@ package org.springframework.data.gemfire.serialization.json; import static org.junit.Assert.assertEquals; import static org.springframework.data.gemfire.util.RuntimeExceptionFactory.newIllegalArgumentException; -import java.io.IOException; import java.util.Arrays; import java.util.Map; @@ -57,7 +56,7 @@ import org.springframework.test.context.junit4.SpringRunner; */ @RunWith(SpringRunner.class) @ContextConfiguration -@SuppressWarnings({ "unchecked", "unused" }) +@SuppressWarnings({ "unused" }) public class JSONRegionAdviceIntegrationTests { // TODO figure out why auto-proxying the Region for JSON support prevents the GemfireTemplate from being "auto-wired", @@ -67,7 +66,7 @@ public class JSONRegionAdviceIntegrationTests { private GemfireOperations template; @Resource(name = "JsonRegion") - private Region jsonRegion; + private Region jsonRegion; @Before public void setup() { @@ -99,7 +98,6 @@ public class JSONRegionAdviceIntegrationTests { } @Test - @SuppressWarnings("unchecked") public void putAll() { Map map = MapBuilder.newMapBuilder() @@ -109,14 +107,14 @@ public class JSONRegionAdviceIntegrationTests { this.jsonRegion.putAll(map); - Map results = this.jsonRegion.getAll(Arrays.asList("key1", "key2")); + Map results = this.jsonRegion.getAll(Arrays.asList("key1", "key2")); assertEquals("{\"hello1\":\"world1\"}", results.get("key1")); assertEquals("{\"hello2\":\"world2\"}", results.get("key2")); } @Test - public void objectToJSon() throws IOException { + public void objectToJSon() { Person davidTuranski = new Person(1L, "David", "Turanski");