From 654fe9a31c0588cae0cdb5d8301717c3af605fad Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 6 Dec 2017 13:55:10 +0000 Subject: [PATCH] Use Checkstyle to police accidental use of unwanted imports Closes gh-11271 --- .../mvc/HalBrowserMvcEndpointDisabledIntegrationTests.java | 2 +- spring-boot-parent/pom.xml | 2 +- spring-boot-parent/src/checkstyle/checkstyle.xml | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointDisabledIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointDisabledIntegrationTests.java index 63a203cd9cb..5da5a34c789 100755 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointDisabledIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointDisabledIntegrationTests.java @@ -16,7 +16,6 @@ package org.springframework.boot.actuate.endpoint.mvc; -import com.google.common.net.HttpHeaders; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -26,6 +25,7 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.actuate.autoconfigure.MinimalActuatorHypermediaApplication; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; diff --git a/spring-boot-parent/pom.xml b/spring-boot-parent/pom.xml index b4c310ea253..b94be322c22 100644 --- a/spring-boot-parent/pom.xml +++ b/spring-boot-parent/pom.xml @@ -305,7 +305,7 @@ com.puppycrawl.tools checkstyle - 7.1.1 + 8.5 diff --git a/spring-boot-parent/src/checkstyle/checkstyle.xml b/spring-boot-parent/src/checkstyle/checkstyle.xml index 8bb9e0a83a2..d77b992f1cb 100644 --- a/spring-boot-parent/src/checkstyle/checkstyle.xml +++ b/spring-boot-parent/src/checkstyle/checkstyle.xml @@ -72,7 +72,10 @@ - + + + +