Skip to content

Commit f335ec0

Browse files
committed
Polish
1 parent b13b3be commit f335ec0

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,9 +37,9 @@
3737
import static io.restassured.RestAssured.given;
3838
import static org.assertj.core.api.Assertions.assertThat;
3939
import static org.hamcrest.CoreMatchers.is;
40+
import static org.springframework.restdocs.operation.preprocess.Preprocessors.modifyUris;
4041
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
4142
import static org.springframework.restdocs.restassured3.RestAssuredRestDocumentation.document;
42-
import static org.springframework.restdocs.restassured3.operation.preprocess.RestAssuredPreprocessors.modifyUris;
4343

4444
/**
4545
* Integration tests for advanced configuration of {@link AutoConfigureRestDocs} with REST

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestAssuredRestDocsAutoConfigurationIntegrationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -34,9 +34,9 @@
3434
import static io.restassured.RestAssured.given;
3535
import static org.assertj.core.api.Assertions.assertThat;
3636
import static org.hamcrest.CoreMatchers.is;
37+
import static org.springframework.restdocs.operation.preprocess.Preprocessors.modifyUris;
3738
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
3839
import static org.springframework.restdocs.restassured3.RestAssuredRestDocumentation.document;
39-
import static org.springframework.restdocs.restassured3.operation.preprocess.RestAssuredPreprocessors.modifyUris;
4040

4141
/**
4242
* Integration tests for {@link RestDocsAutoConfiguration} with REST Assured.

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ private void configureAdditionalMetadataLocations(Project project) {
147147
private void configureAdditionalMetadataLocations(JavaCompile compile) {
148148
compile.doFirst((task) -> {
149149
if (hasConfigurationProcessorOnClasspath(compile)) {
150-
findMatchingSourceSet(compile).ifPresent((sourceSet) -> {
151-
configureAdditionalMetadataLocations(compile, sourceSet);
152-
});
150+
findMatchingSourceSet(compile).ifPresent(
151+
(sourceSet) -> configureAdditionalMetadataLocations(compile,
152+
sourceSet));
153153
}
154154
});
155155
}

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ protected List<Archive> getClassPathArchives() throws Exception {
460460

461461
private List<Archive> getClassPathArchives(String path) throws Exception {
462462
String root = cleanupPath(handleUrl(path));
463-
List<Archive> lib = new ArrayList<Archive>();
463+
List<Archive> lib = new ArrayList<>();
464464
File file = new File(root);
465465
if (!"/".equals(root)) {
466466
if (!isAbsolutePath(root)) {

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/Verify.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private boolean hasUnpackEntry(String entryName) {
141141

142142
private ZipEntry getEntryStartingWith(String entryName) {
143143
return this.content.entrySet().stream()
144-
.filter(entry -> entry.getKey().startsWith(entryName))
144+
.filter((entry) -> entry.getKey().startsWith(entryName))
145145
.map(Map.Entry::getValue).findFirst()
146146
.orElseThrow(() -> new IllegalStateException(
147147
"Unable to find entry starting with " + entryName));

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterTests.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,8 @@ public void exceptionErrorWithCommittedResponse() throws Exception {
247247

248248
@Test
249249
public void statusCode() throws Exception {
250-
this.chain = new TestFilterChain((request, response, chain) -> {
251-
assertThat(response.getStatus()).isEqualTo(200);
252-
});
250+
this.chain = new TestFilterChain((request, response,
251+
chain) -> assertThat(response.getStatus()).isEqualTo(200));
253252
this.filter.doFilter(this.request, this.response, this.chain);
254253
assertThat(((HttpServletResponseWrapper) this.chain.getResponse()).getStatus())
255254
.isEqualTo(200);

0 commit comments

Comments
 (0)