Skip to content

Commit

Permalink
Merge pull request #30406 from quaff
Browse files Browse the repository at this point in the history
* gh-30406:
  Polish "Prevent imports of null-safety annotations"
  Prevent imports of null-safety annotations

Closes gh-30406
  • Loading branch information
wilkinsona committed Mar 25, 2022
2 parents 6e16552 + c087d60 commit 25e1e86
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
<property name="regexp" value="true" />
<property name="illegalPkgs"
value="^sun.*, ^org\.apache\.commons\.(?!compress|dbcp2|logging|pool2).*, ^com\.datastax\.oss\.driver\.shaded.*, ^com\.google\.common.*, ^io\.micrometer\.shaded.*, ^org\.flywaydb\.core\.internal.*, ^org\.testcontainers\.shaded.*" />
value="^sun.*, ^org\.apache\.commons\.(?!compress|dbcp2|logging|pool2).*, ^com\.datastax\.oss\.driver\.shaded.*, ^com\.google\.common.*, ^io\.micrometer\.shaded.*, ^org\.flywaydb\.core\.internal.*, ^org\.jetbrains\.annotations.*, ^org\.testcontainers\.shaded.*" />
<property name="illegalClasses"
value="^com\.hazelcast\.util\.Base64, ^org\.junit\.rules\.ExpectedException, ^org\.mockito\.InjectMocks, ^org\.slf4j\.LoggerFactory, ^org.springframework.context.annotation.ScannedGenericBeanDefinition, ^reactor\.core\.support\.Assert"/>
</module>
Expand Down
11 changes: 11 additions & 0 deletions src/checkstyle/import-control.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!DOCTYPE import-control PUBLIC "-//Checkstyle//DTD ImportControl Configuration 1.4//EN" "https://checkstyle.org/dtds/import_control_1_4.dtd">
<import-control pkg="org.springframework.boot">
<disallow pkg="io.micrometer" />
<disallow pkg="org.springframework.lang" />
<allow pkg=".*" regex="true" />
<subpackage name="autoconfigure">
<disallow class="org.springframework.boot.autoconfigure.jdbc.DataSourceProperties"/>
Expand Down Expand Up @@ -45,6 +46,13 @@
<subpackage name="endpoint">
<disallow pkg="org.springframework.http" />
<disallow pkg="org.springframework.web" />
<subpackage name="invoke">
<subpackage name="reflect">
<file name="OperationMethodParameter">
<allow pkg="org.springframework.lang"/>
</file>
</subpackage>
</subpackage>
<subpackage name="web">
<allow pkg="org.springframework.http" />
<allow pkg="org.springframework.web" />
Expand All @@ -56,6 +64,9 @@
</subpackage>
</subpackage>
</subpackage>
<file name=".*Endpoint(WebExtension)?" regex="true">
<allow pkg="org.springframework.lang"/>
</file>
</subpackage>

<subpackage name="docs">
Expand Down

0 comments on commit 25e1e86

Please sign in to comment.