From aaf435ff2abdbf3b7c96268390cd07cbfaeb8d0e Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 Sep 2016 19:52:18 +0100 Subject: [PATCH] Suppress Neo4J-related deprecation warnings See gh-6976 --- .../autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java | 1 + .../data/neo4j/Neo4jRepositoriesAutoConfiguration.java | 1 + .../data/neo4j/Neo4jRepositoriesAutoConfigureRegistrar.java | 1 + .../boot/autoconfigure/data/alt/neo4j/CityNeo4jRepository.java | 1 + .../neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java | 1 + .../data/neo4j/Neo4jDataAutoConfigurationTests.java | 1 + .../data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java | 1 + .../boot/autoconfigure/data/neo4j/city/CityRepository.java | 2 ++ .../autoconfigure/data/neo4j/country/CountryRepository.java | 1 + .../src/main/java/sample/data/neo4j/CustomerRepository.java | 1 + .../src/main/java/sample/data/neo4j/SampleNeo4jApplication.java | 1 + 11 files changed, 12 insertions(+) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java index 45e9e00f99..c1e112e034 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java @@ -45,6 +45,7 @@ import org.springframework.data.neo4j.template.Neo4jOperations; * @author Stephane Nicoll * @since 1.4.0 */ +@SuppressWarnings("deprecation") @Configuration @ConditionalOnClass({ Neo4jSession.class, Neo4jOperations.class }) @ConditionalOnMissingBean(Neo4jOperations.class) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfiguration.java index fedbca7345..3e81a08097 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfiguration.java @@ -52,6 +52,7 @@ import org.springframework.data.neo4j.repository.support.GraphRepositoryFactoryB * @since 1.4.0 * @see EnableNeo4jRepositories */ +@SuppressWarnings("deprecation") @Configuration @ConditionalOnClass({ Neo4jSession.class, GraphRepository.class }) @ConditionalOnMissingBean({ GraphRepositoryFactoryBean.class, diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigureRegistrar.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigureRegistrar.java index b00d6f7709..fa2fa8230c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigureRegistrar.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigureRegistrar.java @@ -30,6 +30,7 @@ import org.springframework.data.repository.config.RepositoryConfigurationExtensi * * @author Michael Hunger */ +@SuppressWarnings("deprecation") class Neo4jRepositoriesAutoConfigureRegistrar extends AbstractRepositoryConfigurationSourceSupport { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/neo4j/CityNeo4jRepository.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/neo4j/CityNeo4jRepository.java index a4acf364e3..9c2718fc7c 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/neo4j/CityNeo4jRepository.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/neo4j/CityNeo4jRepository.java @@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.data.alt.neo4j; import org.springframework.boot.autoconfigure.data.neo4j.city.City; import org.springframework.data.neo4j.repository.GraphRepository; +@SuppressWarnings("deprecation") public interface CityNeo4jRepository extends GraphRepository { } diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java index 327fdfe078..3e43d4d519 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java @@ -53,6 +53,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Vince Bickers * @author Stephane Nicoll */ +@SuppressWarnings("deprecation") public class MixedNeo4jRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfigurationTests.java index 0ee18b3ad9..e27b482ba7 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfigurationTests.java @@ -44,6 +44,7 @@ import static org.mockito.Mockito.mock; * @author Michael Hunger * @author Vince Bickers */ +@SuppressWarnings("deprecation") public class Neo4jDataAutoConfigurationTests { private AnnotationConfigApplicationContext context; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java index 878eb48373..50b287e58c 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java @@ -44,6 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Vince Bickers * @author Stephane Nicoll */ +@SuppressWarnings("deprecation") public class Neo4jRepositoriesAutoConfigurationTests { private AnnotationConfigApplicationContext context; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/CityRepository.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/CityRepository.java index 67b7f4b860..1851b7798f 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/CityRepository.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/CityRepository.java @@ -20,8 +20,10 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.neo4j.repository.GraphRepository; +@SuppressWarnings("deprecation") public interface CityRepository extends GraphRepository { + @Override Page findAll(Pageable pageable); } diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/CountryRepository.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/CountryRepository.java index a3180af6d8..12cbeddcec 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/CountryRepository.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/CountryRepository.java @@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure.data.neo4j.country; import org.springframework.data.neo4j.repository.GraphRepository; +@SuppressWarnings("deprecation") public interface CountryRepository extends GraphRepository { } diff --git a/spring-boot-samples/spring-boot-sample-data-neo4j/src/main/java/sample/data/neo4j/CustomerRepository.java b/spring-boot-samples/spring-boot-sample-data-neo4j/src/main/java/sample/data/neo4j/CustomerRepository.java index 6c809b901f..91d88b2b4b 100644 --- a/spring-boot-samples/spring-boot-sample-data-neo4j/src/main/java/sample/data/neo4j/CustomerRepository.java +++ b/spring-boot-samples/spring-boot-sample-data-neo4j/src/main/java/sample/data/neo4j/CustomerRepository.java @@ -20,6 +20,7 @@ import java.util.List; import org.springframework.data.neo4j.repository.GraphRepository; +@SuppressWarnings("deprecation") public interface CustomerRepository extends GraphRepository { public Customer findByFirstName(String firstName); diff --git a/spring-boot-samples/spring-boot-sample-data-neo4j/src/main/java/sample/data/neo4j/SampleNeo4jApplication.java b/spring-boot-samples/spring-boot-sample-data-neo4j/src/main/java/sample/data/neo4j/SampleNeo4jApplication.java index 0d60069922..693e6f45b1 100644 --- a/spring-boot-samples/spring-boot-sample-data-neo4j/src/main/java/sample/data/neo4j/SampleNeo4jApplication.java +++ b/spring-boot-samples/spring-boot-sample-data-neo4j/src/main/java/sample/data/neo4j/SampleNeo4jApplication.java @@ -27,6 +27,7 @@ public class SampleNeo4jApplication implements CommandLineRunner { @Autowired private CustomerRepository repository; + @SuppressWarnings("deprecation") @Override public void run(String... args) throws Exception { this.repository.deleteAll();