diff --git a/core/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderAotTests.java b/core/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderAotTests.java index d439e96801f..3c8ddf24da0 100644 --- a/core/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderAotTests.java +++ b/core/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderAotTests.java @@ -60,7 +60,7 @@ class SpringBootContextLoaderAotTests { Class testClass = ExampleTest.class; generator.processAheadOfTime(Stream.of(testClass)); TestCompiler.forSystem() - .withCompilerOptions("-Xlint:deprecation", "-Werror") + .withCompilerOptions("-Xlint:deprecation,removal", "-Werror") .with(CompilerFiles.from(generatedFiles)) .compile(ThrowingConsumer.of((compiled) -> assertCompiledTest(testClass))); } diff --git a/core/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBeanRegistrationAotProcessorTests.java b/core/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBeanRegistrationAotProcessorTests.java index a3a0208120f..6a1f481a515 100644 --- a/core/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBeanRegistrationAotProcessorTests.java +++ b/core/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBeanRegistrationAotProcessorTests.java @@ -161,7 +161,7 @@ class ConfigurationPropertiesBeanRegistrationAotProcessorTests { ClassName className = new ApplicationContextAotGenerator().processAheadOfTime(context, generationContext); generationContext.writeGeneratedContent(); TestCompiler.forSystem() - .withCompilerOptions("-Xlint:deprecation", "-Werror") + .withCompilerOptions("-Xlint:deprecation,removal", "-Werror") .with(generationContext) .compile((compiled) -> { GenericApplicationContext freshApplicationContext = new GenericApplicationContext(); diff --git a/core/spring-boot/src/test/java/org/springframework/boot/support/EnvironmentPostProcessorApplicationListenerTests.java b/core/spring-boot/src/test/java/org/springframework/boot/support/EnvironmentPostProcessorApplicationListenerTests.java index cef534c7cfe..5502ca4c0ca 100644 --- a/core/spring-boot/src/test/java/org/springframework/boot/support/EnvironmentPostProcessorApplicationListenerTests.java +++ b/core/spring-boot/src/test/java/org/springframework/boot/support/EnvironmentPostProcessorApplicationListenerTests.java @@ -308,7 +308,7 @@ class EnvironmentPostProcessorApplicationListenerTests { new ApplicationContextAotGenerator().processAheadOfTime(context, generationContext); generationContext.writeGeneratedContent(); TestCompiler.forSystem() - .withCompilerOptions("-Xlint:deprecation", "-Werror") + .withCompilerOptions("-Xlint:deprecation,removal", "-Werror") .with(generationContext) .compile(compiled); } diff --git a/module/spring-boot-flyway/src/test/java/org/springframework/boot/flyway/autoconfigure/ResourceProviderCustomizerBeanRegistrationAotProcessorTests.java b/module/spring-boot-flyway/src/test/java/org/springframework/boot/flyway/autoconfigure/ResourceProviderCustomizerBeanRegistrationAotProcessorTests.java index 757ba61d424..888204c9f97 100644 --- a/module/spring-boot-flyway/src/test/java/org/springframework/boot/flyway/autoconfigure/ResourceProviderCustomizerBeanRegistrationAotProcessorTests.java +++ b/module/spring-boot-flyway/src/test/java/org/springframework/boot/flyway/autoconfigure/ResourceProviderCustomizerBeanRegistrationAotProcessorTests.java @@ -88,7 +88,7 @@ class ResourceProviderCustomizerBeanRegistrationAotProcessorTests { ClassName className = new ApplicationContextAotGenerator().processAheadOfTime(context, generationContext); generationContext.writeGeneratedContent(); TestCompiler.forSystem() - .withCompilerOptions("-Xlint:deprecation", "-Werror") + .withCompilerOptions("-Xlint:deprecation,removal", "-Werror") .with(generationContext) .compile((compiled) -> { GenericApplicationContext freshApplicationContext = new GenericApplicationContext(); diff --git a/module/spring-boot-jackson/src/test/java/org/springframework/boot/jackson/JacksonMixinModuleEntriesBeanRegistrationAotProcessorTests.java b/module/spring-boot-jackson/src/test/java/org/springframework/boot/jackson/JacksonMixinModuleEntriesBeanRegistrationAotProcessorTests.java index e07829d2e2b..4f5eced78ba 100644 --- a/module/spring-boot-jackson/src/test/java/org/springframework/boot/jackson/JacksonMixinModuleEntriesBeanRegistrationAotProcessorTests.java +++ b/module/spring-boot-jackson/src/test/java/org/springframework/boot/jackson/JacksonMixinModuleEntriesBeanRegistrationAotProcessorTests.java @@ -107,7 +107,7 @@ class JacksonMixinModuleEntriesBeanRegistrationAotProcessorTests { private void compile(BiConsumer result) { ClassName className = processAheadOfTime(); TestCompiler.forSystem() - .withCompilerOptions("-Xlint:deprecation", "-Werror") + .withCompilerOptions("-Xlint:deprecation,removal", "-Werror") .with(this.generationContext) .compile((compiled) -> { GenericApplicationContext freshApplicationContext = new GenericApplicationContext(); diff --git a/module/spring-boot-jackson2/src/test/java/org/springframework/boot/jackson2/JsonMixinModuleEntriesBeanRegistrationAotProcessorTests.java b/module/spring-boot-jackson2/src/test/java/org/springframework/boot/jackson2/JsonMixinModuleEntriesBeanRegistrationAotProcessorTests.java index 332b84d37eb..d160fb64fca 100644 --- a/module/spring-boot-jackson2/src/test/java/org/springframework/boot/jackson2/JsonMixinModuleEntriesBeanRegistrationAotProcessorTests.java +++ b/module/spring-boot-jackson2/src/test/java/org/springframework/boot/jackson2/JsonMixinModuleEntriesBeanRegistrationAotProcessorTests.java @@ -110,7 +110,7 @@ class JsonMixinModuleEntriesBeanRegistrationAotProcessorTests { private void compile(BiConsumer result) { ClassName className = processAheadOfTime(); TestCompiler.forSystem() - .withCompilerOptions("-Xlint:deprecation", "-Werror") + .withCompilerOptions("-Xlint:deprecation,removal", "-Werror") .with(this.generationContext) .compile((compiled) -> { GenericApplicationContext freshApplicationContext = new GenericApplicationContext(); diff --git a/module/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/servlet/context/ServletComponentScanRegistrarTests.java b/module/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/servlet/context/ServletComponentScanRegistrarTests.java index beeb1023263..eec6fa4fa07 100644 --- a/module/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/servlet/context/ServletComponentScanRegistrarTests.java +++ b/module/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/servlet/context/ServletComponentScanRegistrarTests.java @@ -177,7 +177,7 @@ class ServletComponentScanRegistrarTests { ClassName className = new ApplicationContextAotGenerator().processAheadOfTime(context, generationContext); generationContext.writeGeneratedContent(); TestCompiler.forSystem() - .withCompilerOptions("-Xlint:deprecation", "-Werror") + .withCompilerOptions("-Xlint:deprecation,removal", "-Werror") .with(generationContext) .compile((compiled) -> { GenericApplicationContext freshApplicationContext = new GenericApplicationContext();