Add nullability annotations to tests in module/spring-boot-groovy-templates

See gh-47263
This commit is contained in:
Moritz Halbritter 2025-09-26 12:26:05 +02:00
parent 9f1e033caf
commit 09311ff44e
2 changed files with 6 additions and 1 deletions

View File

@ -40,3 +40,7 @@ dependencies {
testRuntimeOnly("ch.qos.logback:logback-classic")
}
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}

View File

@ -29,6 +29,7 @@ import groovy.text.markup.DelegatingIndentWriter;
import groovy.text.markup.MarkupTemplateEngine;
import groovy.text.markup.TemplateConfiguration;
import jakarta.servlet.http.HttpServletRequest;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@ -320,7 +321,7 @@ class GroovyTemplateAutoConfigurationTests {
}
@Override
public Object run() {
public @Nullable Object run() {
return null;
}