From 79d592a3c1ae9603e94bd279ca2cf1e3817821d2 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Mon, 11 Feb 2019 21:01:07 -0500 Subject: [PATCH] Fixes checkstyle problems --- .../jackson/BusJacksonIntegrationTests.java | 28 +++++++++---------- src/checkstyle/checkstyle-suppressions.xml | 7 +++++ 2 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 src/checkstyle/checkstyle-suppressions.xml diff --git a/spring-cloud-bus-tests/src/test/java/org/springframework/cloud/bus/jackson/BusJacksonIntegrationTests.java b/spring-cloud-bus-tests/src/test/java/org/springframework/cloud/bus/jackson/BusJacksonIntegrationTests.java index e3f2679..bc3ba60 100644 --- a/spring-cloud-bus-tests/src/test/java/org/springframework/cloud/bus/jackson/BusJacksonIntegrationTests.java +++ b/spring-cloud-bus-tests/src/test/java/org/springframework/cloud/bus/jackson/BusJacksonIntegrationTests.java @@ -50,8 +50,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = RANDOM_PORT, - properties = "spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS:true") +@SpringBootTest(properties = "spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS:true", webEnvironment = RANDOM_PORT) public class BusJacksonIntegrationTests { @LocalServerPort @@ -68,13 +67,14 @@ public class BusJacksonIntegrationTests { public void testCustomEventSerializes() { assertThat(this.converter.isMapperCreated()).isFalse(); - // set by configuration - assertThat(this.converter.getMapper().getSerializationConfig() - .isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)).isTrue(); + // set by configuration + assertThat(this.converter.getMapper().getSerializationConfig() + .isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)).isTrue(); - Map map = this.rest.getForObject("http://localhost:" + this.port + "/date", Map.class); - assertThat(map).containsOnlyKeys("date"); - assertThat(map.get("date")).isInstanceOf(Long.class); + Map map = this.rest.getForObject("http://localhost:" + this.port + "/date", + Map.class); + assertThat(map).containsOnlyKeys("date"); + assertThat(map.get("date")).isInstanceOf(Long.class); this.rest.put("http://localhost:" + this.port + "/names" + "/foo", null); this.rest.put("http://localhost:" + this.port + "/names" + "/bar", null); @@ -133,12 +133,12 @@ public class BusJacksonIntegrationTests { new NameEvent(this, this.busServiceMatcher.getServiceId(), name)); } - @GetMapping("/date") - public Map testTimeJsonSerialization(){ - Map map = new HashMap<>(); - map.put("date", new Date()); - return map; - } + @GetMapping("/date") + public Map testTimeJsonSerialization() { + Map map = new HashMap<>(); + map.put("date", new Date()); + return map; + } @EventListener public void handleNameSaid(NameEvent event) { diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml new file mode 100644 index 0000000..485b7e1 --- /dev/null +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -0,0 +1,7 @@ + + + + +