Check that nullable annotations are from org.springframework.lang
Fix a few incorrect nullable annotation imports and add a checkstyle rule to ensure they don't return. Closes gh-28410
This commit is contained in:
@@ -23,7 +23,8 @@ import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
|
||||
/**
|
||||
* Internal class used by {@link SourceFiles} and {@link ResourceFiles} to
|
||||
|
||||
@@ -19,7 +19,8 @@ package org.springframework.aot.test.generator.file;
|
||||
import java.util.Iterator;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
|
||||
/**
|
||||
* An immutable collection of {@link ResourceFile} instances.
|
||||
|
||||
@@ -18,8 +18,6 @@ package org.springframework.aot.test.generator.file;
|
||||
|
||||
import java.io.StringReader;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.thoughtworks.qdox.JavaProjectBuilder;
|
||||
import com.thoughtworks.qdox.model.JavaClass;
|
||||
import com.thoughtworks.qdox.model.JavaPackage;
|
||||
@@ -27,6 +25,8 @@ import com.thoughtworks.qdox.model.JavaSource;
|
||||
import org.assertj.core.api.AssertProvider;
|
||||
import org.assertj.core.util.Strings;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link DynamicFile} that holds Java source code and provides
|
||||
* {@link SourceFileAssert} support. Usually created from an AOT generated type,
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.aot.test.generator.file;
|
||||
import java.util.Iterator;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* An immutable collection of {@link SourceFile} instances.
|
||||
|
||||
Reference in New Issue
Block a user