Skip to content

Commit 3ff20b2

Browse files
committed
Restore import-control checkstyle
Restore checkstyle import control and fix a few violations in the process. Closes gh-14660
1 parent 63b64b4 commit 3ff20b2

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
5454
<suppressionsLocation>src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
5555
<includeTestSourceDirectory>true</includeTestSourceDirectory>
56+
<propertyExpansion>main.basedir=${main.basedir}</propertyExpansion>
5657
</configuration>
5758
<goals>
5859
<goal>check</goal>

spring-boot-project/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<name>Spring Boot Build</name>
1313
<description>Spring Boot Build</description>
1414
<properties>
15-
<main.basedir>${basedir}/../..</main.basedir>
15+
<main.basedir>${basedir}/..</main.basedir>
1616
</properties>
1717
<modules>
1818
<module>spring-boot-dependencies</module>

spring-boot-project/spring-boot-dependencies/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
</developer>
3232
</developers>
3333
<properties>
34+
<main.basedir>${basedir}/../..</main.basedir>
3435
<!-- Dependency versions -->
3536
<activemq.version>5.15.6</activemq.version>
3637
<antlr2.version>2.7.7</antlr2.version>

spring-boot-project/spring-boot-starters/spring-boot-starter-parent/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<description>Parent pom providing dependency and plugin management for applications
1515
built with Maven</description>
1616
<properties>
17+
<main.basedir>${basedir}/../../..</main.basedir>
1718
<java.version>1.8</java.version>
1819
<resource.delimiter>@</resource.delimiter> <!-- delimiter that doesn't clash with Spring ${} placeholders -->
1920
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/filter/OrderedHiddenHttpMethodFilter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.boot.web.reactive.filter;
1818

19-
import org.springframework.boot.web.servlet.FilterRegistrationBean;
2019
import org.springframework.core.Ordered;
2120
import org.springframework.web.filter.reactive.HiddenHttpMethodFilter;
2221

@@ -32,8 +31,7 @@ public class OrderedHiddenHttpMethodFilter extends HiddenHttpMethodFilter
3231
/**
3332
* The default order is high to ensure the filter is applied before Spring Security.
3433
*/
35-
public static final int DEFAULT_ORDER = FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER
36-
- 10000;
34+
public static final int DEFAULT_ORDER = -10000;
3735

3836
private int order = DEFAULT_ORDER;
3937

src/checkstyle/checkstyle.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,11 @@
1111
<property name="illegalClasses"
1212
value="^reactor\.core\.support\.Assert" />
1313
</module>
14+
<module
15+
name="com.puppycrawl.tools.checkstyle.checks.imports.ImportControlCheck">
16+
<property name="file"
17+
value="${main.basedir}/src/checkstyle/import-control.xml" />
18+
<property name="path" value="^.*[\\/]src[\\/]main[\\/].*$" />
19+
</module>
1420
</module>
1521
</module>

src/checkstyle/import-control.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
<subpackage name="autoconfigure">
77
<subpackage name="web">
8+
<allow pkg="org.springframework.boot.web.server" />
9+
<allow pkg="org.springframework.boot.web.servlet.server" />
810
<disallow pkg="org.springframework.boot.web" />
911
<disallow pkg="org.springframework.web.servlet" />
1012
<disallow pkg="org.springframework.web.reactive" />
1113
<disallow pkg="javax.servlet" />
12-
<allow pkg="org.springframework.boot.web.server" />
13-
<allow pkg="org.springframework.boot.web.servlet.server" />
1414
<subpackage name="client">
1515
<allow pkg="org.springframework.boot.web.client" />
1616
</subpackage>

0 commit comments

Comments
 (0)