Clean up warnings in tests

This commit is contained in:
Sam Brannen 2022-10-04 16:19:37 +02:00
parent 31d98bfd95
commit 5bff2c7341
2 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,7 @@ class AotProcessorTests {
assertThat(className).isEqualTo(ClassName.get(SampleApplication.class.getPackageName(),
"AotProcessorTests_SampleApplication__ApplicationContextInitializer"));
assertThat(directory).satisfies(hasGeneratedAssetsForSampleApplication());
context.close();
}
@Test
@ -81,6 +82,7 @@ class AotProcessorTests {
processor.process();
assertThat(directory.resolve("resource/META-INF/native-image/com.example/example/native-image.properties"))
.doesNotExist();
context.close();
}
private Path createExisting(Path directory) throws IOException {

View File

@ -46,8 +46,10 @@ class ReflectionHintsPredicatesTests {
private static Constructor<?> publicConstructor;
@SuppressWarnings("unused")
private static Method publicMethod;
@SuppressWarnings("unused")
private static Field publicField;
private final ReflectionHintsPredicates reflection = new ReflectionHintsPredicates();