Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
4c21dc1c
Commit
4c21dc1c
authored
Jun 07, 2019
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x'
parents
56adc695
fed11feb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
18 deletions
+51
-18
pom.xml
pom.xml
+16
-2
ControllerEndpointDiscovererTests.java
...int/web/annotation/ControllerEndpointDiscovererTests.java
+2
-2
ServletEndpointDiscovererTests.java
...dpoint/web/annotation/ServletEndpointDiscovererTests.java
+5
-5
checkstyle-suppressions.xml
src/checkstyle/checkstyle-suppressions.xml
+0
-8
nohttp-checkstyle-suppressions.xml
src/checkstyle/nohttp-checkstyle-suppressions.xml
+14
-0
nohttp-checkstyle.xml
src/checkstyle/nohttp-checkstyle.xml
+7
-0
nohttp-whitelist.txt
src/checkstyle/nohttp-whitelist.txt
+7
-1
No files found.
pom.xml
View file @
4c21dc1c
...
...
@@ -60,13 +60,27 @@
<suppressionsLocation>
src/checkstyle/checkstyle-suppressions.xml
</suppressionsLocation>
<includeTestSourceDirectory>
true
</includeTestSourceDirectory>
<propertyExpansion>
main.basedir=${main.basedir}
</propertyExpansion>
<sourceDirectories>
./
</sourceDirectories>
</configuration>
<goals>
<goal>
check
</goal>
</goals>
</execution>
<execution>
<id>
nohttp-checkstyle-validation
</id>
<phase>
validate
</phase>
<configuration>
<skip>
${disable.checks}
</skip>
<configLocation>
src/checkstyle/nohttp-checkstyle.xml
</configLocation>
<suppressionsLocation>
src/checkstyle/nohttp-checkstyle-suppressions.xml
</suppressionsLocation>
<propertyExpansion>
main.basedir=${main.basedir}
</propertyExpansion>
<sourceDirectories>
${basedir}
</sourceDirectories>
<includes>
**/*
</includes>
<excludes>
.git/**/*,target/**/
*
</excludes>
<excludes>
.git/**/*,target/**/
,**/.flattened-pom.xml
</excludes>
</configuration>
<goals>
<goal>
check
</goal>
</goals>
<inherited>
false
</inherited>
</execution>
</executions>
</plugin>
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/ControllerEndpointDiscovererTests.java
View file @
4c21dc1c
...
...
@@ -39,7 +39,7 @@ import org.springframework.context.annotation.Import;
import
org.springframework.validation.annotation.Validated
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
ExceptionOfType
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
IllegalStateException
;
/**
* Tests for {@link ControllerEndpointDiscoverer}.
...
...
@@ -123,7 +123,7 @@ class ControllerEndpointDiscovererTests {
@Test
void
getEndpointWhenEndpointHasOperationsShouldThrowException
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestControllerWithOperation
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
ExceptionOfType
(
IllegalStateException
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
IllegalStateException
(
)
.
isThrownBy
(
discoverer:
:
getEndpoints
)
.
withMessageContaining
(
"ControllerEndpoints must not declare operations"
)));
}
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/ServletEndpointDiscovererTests.java
View file @
4c21dc1c
...
...
@@ -48,7 +48,7 @@ import org.springframework.context.annotation.Import;
import
org.springframework.validation.annotation.Validated
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
ExceptionOfType
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
IllegalStateException
;
/**
* Tests for {@link ServletEndpointDiscoverer}.
...
...
@@ -106,7 +106,7 @@ class ServletEndpointDiscovererTests {
@Test
void
getEndpointWhenEndpointHasOperationsShouldThrowException
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestServletEndpointWithOperation
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
ExceptionOfType
(
IllegalStateException
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
IllegalStateException
(
)
.
isThrownBy
(
discoverer:
:
getEndpoints
)
.
withMessageContaining
(
"ServletEndpoints must not declare operations"
)));
}
...
...
@@ -114,21 +114,21 @@ class ServletEndpointDiscovererTests {
@Test
void
getEndpointWhenEndpointNotASupplierShouldThrowException
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestServletEndpointNotASupplier
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
ExceptionOfType
(
IllegalStateException
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
IllegalStateException
(
)
.
isThrownBy
(
discoverer:
:
getEndpoints
).
withMessageContaining
(
"must be a supplier"
)));
}
@Test
void
getEndpointWhenEndpointSuppliesWrongTypeShouldThrowException
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestServletEndpointSupplierOfWrongType
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
ExceptionOfType
(
IllegalStateException
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
IllegalStateException
(
)
.
isThrownBy
(
discoverer:
:
getEndpoints
).
withMessageContaining
(
"must supply an EndpointServlet"
)));
}
@Test
void
getEndpointWhenEndpointSuppliesNullShouldThrowException
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestServletEndpointSupplierOfNull
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
ExceptionOfType
(
IllegalStateException
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
assertThat
IllegalStateException
(
)
.
isThrownBy
(
discoverer:
:
getEndpoints
).
withMessageContaining
(
"must not supply null"
)));
}
...
...
src/checkstyle/checkstyle-suppressions.xml
View file @
4c21dc1c
...
...
@@ -3,14 +3,6 @@
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
<suppress
files=
"\.DS_Store"
checks=
".*"
/>
<suppress
files=
"[\\/]spring-boot-gradle-plugin[\\/]build"
checks=
".*"
/>
<suppress
files=
"[\\/]\.flattened-pom\.xml"
checks=
".*"
/>
<suppress
files=
"[\\/]transaction-logs[\\/]"
checks=
".*"
/>
<suppress
files=
"[\\/]target[\\/]"
checks=
".*"
/>
<suppress
files=
"[\\/]build.log"
checks=
".*"
/>
<suppress
files=
".+\.(jar|git|ico|p12|svg|png)"
checks=
".*"
/>
<suppress
files=
"eclipse[\\/]spring-boot-project.setup"
checks=
"NoHttp"
/>
<suppress
files=
"SpringApplicationTests\.java"
checks=
"FinalClass"
/>
<suppress
files=
".+Configuration\.java"
checks=
"HideUtilityClassConstructor"
/>
<suppress
files=
".+Application\.java"
checks=
"HideUtilityClassConstructor"
/>
...
...
src/checkstyle/nohttp-checkstyle-suppressions.xml
0 → 100644
View file @
4c21dc1c
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
<suppress
files=
"[\\/]transaction-logs[\\/]"
checks=
"NoHttp"
/>
<suppress
files=
"[\\/]target[\\/]"
checks=
"NoHttp"
/>
<suppress
files=
"[\\/]build.log"
checks=
"NoHttp"
/>
<suppress
files=
".+\.(jar|git|ico|p12|gif|jks|jpg)"
checks=
"NoHttp"
/>
<suppress
files=
"dependency-reduced-pom.xml"
checks=
"NoHttp"
/>
<suppress
files=
"jquery.validate.js"
checks=
"NoHttp"
/>
<suppress
files=
"jquery-[0-9]\.[0-9]\.[0-9].js"
checks=
"NoHttp"
/>
<suppress
files=
"[\\/]spring-boot-project.setup"
checks=
"NoHttp"
/>
</suppressions>
src/checkstyle/nohttp-checkstyle.xml
0 → 100644
View file @
4c21dc1c
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "https://checkstyle.org/dtds/configuration_1_2.dtd">
<module
name=
"com.puppycrawl.tools.checkstyle.Checker"
>
<module
name=
"io.spring.nohttp.checkstyle.check.NoHttpCheck"
>
<property
name=
"whitelistFileName"
value=
"${main.basedir}/src/checkstyle/nohttp-whitelist.txt"
/>
</module>
</module>
src/checkstyle/nohttp-whitelist.txt
View file @
4c21dc1c
^http://
livereload.com/protocols/official-7
.*
^http://
docs.groovy-lang.org
.*
^http://exslt.org/common.*
^http://groovy-lang.org.*
^http://hsqldb.org.*
^http://livereload.com/.*
^http://www.jdotsoft.com.*
^http://spockframework.org.*
^http://ganglia.sourceforge.net.*
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment