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
47874d8c
Commit
47874d8c
authored
Jun 03, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Treat warnings as errors when compiling
See gh-21271
parent
0f1ada5e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
7 deletions
+24
-7
JavaConventions.java
.../java/org/springframework/boot/build/JavaConventions.java
+11
-1
WebFluxTest.java
...ork/boot/test/autoconfigure/web/reactive/WebFluxTest.java
+4
-4
WebMvcTest.java
...ework/boot/test/autoconfigure/web/servlet/WebMvcTest.java
+2
-2
build.gradle
...ot-tools/spring-boot-configuration-processor/build.gradle
+1
-0
build.gradle
...t/spring-boot-tools/spring-boot-loader-tools/build.gradle
+6
-0
No files found.
buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java
View file @
47874d8c
...
...
@@ -25,6 +25,7 @@ import java.util.function.Consumer;
import
io.spring.javaformat.gradle.FormatTask
;
import
io.spring.javaformat.gradle.SpringJavaFormatPlugin
;
import
org.gradle.api.JavaVersion
;
import
org.gradle.api.Project
;
import
org.gradle.api.artifacts.Configuration
;
import
org.gradle.api.artifacts.ConfigurationContainer
;
...
...
@@ -56,7 +57,13 @@ import org.springframework.boot.build.testing.TestFailuresPlugin;
* <li>{@link Test} tasks are configured to use JUnit Platform and use a max heap of 1024M
* <li>{@link JavaCompile}, {@link Javadoc}, and {@link FormatTask} tasks are configured
* to use UTF-8 encoding
* <li>{@link JavaCompile} tasks are configured to use {@code -parameters}
* <li>{@link JavaCompile} tasks are configured to use {@code -parameters} and, when
* compiling with Java 8, to:
* <ul>
* <li>Treat warnings as errors
* <li>Enable {@code unchecked}, {@code deprecation}, {@code rawtypes}, and {@code varags}
* warnings
* </ul>
* <li>{@link Jar} tasks are configured to produce jars with LICENSE.txt and NOTICE.txt
* files and the following manifest entries:
* <ul>
...
...
@@ -149,6 +156,9 @@ class JavaConventions {
if
(!
args
.
contains
(
"-parameters"
))
{
args
.
add
(
"-parameters"
);
}
if
(
JavaVersion
.
current
()
==
JavaVersion
.
VERSION_1_8
)
{
args
.
add
(
"-Werror"
);
}
});
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTest.java
View file @
47874d8c
...
...
@@ -32,7 +32,6 @@ import org.springframework.boot.test.autoconfigure.core.AutoConfigureCache;
import
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFilters
;
import
org.springframework.boot.test.autoconfigure.json.AutoConfigureJson
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.boot.test.mock.mockito.MockBean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.core.annotation.AliasFor
;
...
...
@@ -55,9 +54,10 @@ import org.springframework.test.web.reactive.server.WebTestClient;
* {@link WebTestClient}. For more fine-grained control of WebTestClient the
* {@link AutoConfigureWebTestClient @AutoConfigureWebTestClient} annotation can be used.
* <p>
* Typically {@code @WebFluxTest} is used in combination with {@link MockBean @MockBean}
* or {@link Import @Import} to create any collaborators required by your
* {@code @Controller} beans.
* Typically {@code @WebFluxTest} is used in combination with
* {@link org.springframework.boot.test.mock.mockito.MockBean @MockBean} or
* {@link Import @Import} to create any collaborators required by your {@code @Controller}
* beans.
* <p>
* If you are looking to load your full application configuration and use WebTestClient,
* you should consider {@link SpringBootTest @SpringBootTest} combined with
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTest.java
View file @
47874d8c
...
...
@@ -31,7 +31,6 @@ import org.springframework.boot.test.autoconfigure.OverrideAutoConfiguration;
import
org.springframework.boot.test.autoconfigure.core.AutoConfigureCache
;
import
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFilters
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.boot.test.mock.mockito.MockBean
;
import
org.springframework.context.annotation.ComponentScan.Filter
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.core.annotation.AliasFor
;
...
...
@@ -56,7 +55,8 @@ import org.springframework.test.web.servlet.MockMvc;
* WebDriver). For more fine-grained control of MockMVC the
* {@link AutoConfigureMockMvc @AutoConfigureMockMvc} annotation can be used.
* <p>
* Typically {@code @WebMvcTest} is used in combination with {@link MockBean @MockBean} or
* Typically {@code @WebMvcTest} is used in combination with
* {@link org.springframework.boot.test.mock.mockito.MockBean @MockBean} or
* {@link Import @Import} to create any collaborators required by your {@code @Controller}
* beans.
* <p>
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/build.gradle
View file @
47874d8c
...
...
@@ -15,6 +15,7 @@ sourceSets {
}
dependencies
{
testCompileOnly
(
"com.google.code.findbugs:jsr305:3.0.2"
)
testImplementation
(
enforcedPlatform
(
project
(
":spring-boot-project:spring-boot-dependencies"
)))
testImplementation
(
project
(
":spring-boot-project:spring-boot-tools:spring-boot-test-support"
))
testImplementation
(
"javax.validation:validation-api"
)
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle
View file @
47874d8c
...
...
@@ -65,3 +65,9 @@ processResources {
dependsOn
reproducibleLoaderJar
dependsOn
reproducibleJarModeLayerToolsJar
}
compileJava
{
if
((!
project
.
hasProperty
(
"buildJavaHome"
))
&&
JavaVersion
.
current
()
==
JavaVersion
.
VERSION_1_8
)
{
options
.
compilerArgs
+=
[
'-Xlint:-sunapi'
,
'-XDenableSunApiLintControl'
]
}
}
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