mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-22 09:09:01 +00:00
Polish "Update AOT tests to fail if deprecated code is not suppressed"
Include use of API that has been marked for removal. See gh-48566
This commit is contained in:
+1
-1
@@ -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)));
|
||||
}
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ class JacksonMixinModuleEntriesBeanRegistrationAotProcessorTests {
|
||||
private void compile(BiConsumer<GenericApplicationContext, Compiled> result) {
|
||||
ClassName className = processAheadOfTime();
|
||||
TestCompiler.forSystem()
|
||||
.withCompilerOptions("-Xlint:deprecation", "-Werror")
|
||||
.withCompilerOptions("-Xlint:deprecation,removal", "-Werror")
|
||||
.with(this.generationContext)
|
||||
.compile((compiled) -> {
|
||||
GenericApplicationContext freshApplicationContext = new GenericApplicationContext();
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ class JsonMixinModuleEntriesBeanRegistrationAotProcessorTests {
|
||||
private void compile(BiConsumer<GenericApplicationContext, Compiled> result) {
|
||||
ClassName className = processAheadOfTime();
|
||||
TestCompiler.forSystem()
|
||||
.withCompilerOptions("-Xlint:deprecation", "-Werror")
|
||||
.withCompilerOptions("-Xlint:deprecation,removal", "-Werror")
|
||||
.with(this.generationContext)
|
||||
.compile((compiled) -> {
|
||||
GenericApplicationContext freshApplicationContext = new GenericApplicationContext();
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user