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:
@@ -27,6 +27,9 @@
|
||||
<!-- spring-core -->
|
||||
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]org[\\/]springframework[\\/]asm[\\/]" checks=".*" />
|
||||
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]org[\\/]springframework[\\/]cglib[\\/]" checks=".*" />
|
||||
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]org[\\/]springframework[\\/]lang[\\/]" checks="IllegalImport" id="bannedImports" message="javax"/>
|
||||
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]org[\\/]springframework[\\/]core[\\/]annotation[\\/]" checks="IllegalImport" id="bannedImports" message="javax"/>
|
||||
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]org[\\/]springframework[\\/]core[\\/]annotation[\\/]" checks="IllegalImport" id="bannedImports" message="javax"/>
|
||||
<suppress files="ByteArrayEncoder" checks="SpringLambda" />
|
||||
<suppress files="SocketUtils" checks="HideUtilityClassConstructor" />
|
||||
<suppress files="ResolvableType" checks="FinalClass" />
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
<property name="id" value="bannedImports"/>
|
||||
<property name="regexp" value="true" />
|
||||
<property name="illegalClasses"
|
||||
value="^reactor\.core\.support\.Assert,^org\.slf4j\.LoggerFactory" />
|
||||
value="^reactor\.core\.support\.Assert,^org\.slf4j\.LoggerFactory,^(?!org\.springframework).*(NonNull|Nonnull|NonNullApi|NonNullFields|Nullable)$" />
|
||||
</module>
|
||||
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
|
||||
<property name="id" value="bannedJUnit3Imports"/>
|
||||
|
||||
Reference in New Issue
Block a user