mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-27 04:19:03 +00:00
Add nullability annotations to build-plugin/spring-boot-antlib
See gh-46587
This commit is contained in:
+4
-3
@@ -23,6 +23,7 @@ import java.util.jar.JarFile;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.loader.tools.MainClassFinder;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -37,11 +38,11 @@ public class FindMainClass extends Task {
|
||||
|
||||
private static final String SPRING_BOOT_APPLICATION_CLASS_NAME = "org.springframework.boot.autoconfigure.SpringBootApplication";
|
||||
|
||||
private String mainClass;
|
||||
private @Nullable String mainClass;
|
||||
|
||||
private File classesRoot;
|
||||
private @Nullable File classesRoot;
|
||||
|
||||
private String property;
|
||||
private @Nullable String property;
|
||||
|
||||
public FindMainClass(Project project) {
|
||||
setProject(project);
|
||||
|
||||
+3
-2
@@ -19,6 +19,7 @@ package org.springframework.boot.ant;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@@ -30,7 +31,7 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public class ShareAntlibLoader extends Task {
|
||||
|
||||
private String refid;
|
||||
private @Nullable String refid;
|
||||
|
||||
public ShareAntlibLoader(Project project) {
|
||||
setProject(project);
|
||||
@@ -44,7 +45,7 @@ public class ShareAntlibLoader extends Task {
|
||||
getProject().addReference(this.refid, getClass().getClassLoader());
|
||||
}
|
||||
|
||||
public void setRefid(String refid) {
|
||||
public void setRefid(@Nullable String refid) {
|
||||
this.refid = refid;
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -17,4 +17,7 @@
|
||||
/**
|
||||
* Support for building Spring Boot applications using Ant.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.ant;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
Reference in New Issue
Block a user