Skip to content

Commit 64f43c3

Browse files
committed
Merge pull request #13192 from izeye:polish-20180517
* pr/13192: Polish
2 parents c271f8e + 75639aa commit 64f43c3

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/AbstractHealthAggregator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
package org.springframework.boot.actuate.health;
1818

19-
import java.util.ArrayList;
2019
import java.util.LinkedHashMap;
2120
import java.util.List;
2221
import java.util.Map;
22+
import java.util.stream.Collectors;
2323

2424
/**
2525
* Base {@link HealthAggregator} implementation to allow subclasses to focus on
@@ -33,8 +33,8 @@ public abstract class AbstractHealthAggregator implements HealthAggregator {
3333

3434
@Override
3535
public final Health aggregate(Map<String, Health> healths) {
36-
List<Status> statusCandidates = new ArrayList<>();
37-
healths.values().forEach((health) -> statusCandidates.add(health.getStatus()));
36+
List<Status> statusCandidates = healths.values().stream()
37+
.map(Health::getStatus).collect(Collectors.toList());
3838
Status status = aggregateStatus(statusCandidates);
3939
Map<String, Object> details = aggregateDetails(healths);
4040
return new Health.Builder(status, details).build();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@
333333
<expandproperties />
334334
</filterchain>
335335
</copy>
336-
<attachartifact file="${project.build.directory}/homebrew/springboot.rb"
337-
classifier="homebrew" type="rb" />
338-
</target>
336+
<attachartifact file="${project.build.directory}/homebrew/springboot.rb"
337+
classifier="homebrew" type="rb" />
338+
</target>
339339
</configuration>
340340
</execution>
341341
<execution>

spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ use `setStatus(int)` rather `sendError(int)`. This prevents Jersey from committi
13651365
response before Spring Security has had an opportunity to report an authentication or
13661366
authorization failure to the client.
13671367

1368-
The `jersey.config.server.response.setStatusOverSendError` proeprty must be set to `true`
1368+
The `jersey.config.server.response.setStatusOverSendError` property must be set to `true`
13691369
on the application's `ResourceConfig` bean, as shown in the following example:
13701370

13711371
[source,java,indent=0]

spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner {
6969

7070
private static final Pattern INTELLIJ_CLASSPATH_JAR_PATTERN = Pattern
71-
.compile(".*classpath(\\d+)?.jar");
71+
.compile(".*classpath(\\d+)?\\.jar");
7272

7373
public ModifiedClassPathRunner(Class<?> testClass) throws InitializationError {
7474
super(testClass);

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletContextInitializerBeans.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.Map;
2929
import java.util.Map.Entry;
3030
import java.util.Set;
31+
import java.util.stream.Collectors;
3132

3233
import javax.servlet.Filter;
3334
import javax.servlet.MultipartConfigElement;
@@ -78,11 +79,9 @@ public ServletContextInitializerBeans(ListableBeanFactory beanFactory) {
7879
this.initializers = new LinkedMultiValueMap<>();
7980
addServletContextInitializerBeans(beanFactory);
8081
addAdaptableBeans(beanFactory);
81-
List<ServletContextInitializer> sortedInitializers = new ArrayList<>();
82-
this.initializers.values().forEach((contextInitializers) -> {
83-
AnnotationAwareOrderComparator.sort(contextInitializers);
84-
sortedInitializers.addAll(contextInitializers);
85-
});
82+
List<ServletContextInitializer> sortedInitializers = this.initializers.values().stream()
83+
.flatMap(value -> value.stream().sorted(AnnotationAwareOrderComparator.INSTANCE))
84+
.collect(Collectors.toList());
8685
this.sortedList = Collections.unmodifiableList(sortedInitializers);
8786
}
8887

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/MockConfigurationPropertySource.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,6 @@ public ConfigurationProperty getConfigurationProperty(
107107
return MockConfigurationPropertySource.this.getConfigurationProperty(name);
108108
}
109109

110-
@Override
111-
public ConfigurationPropertyState containsDescendantOf(
112-
ConfigurationPropertyName name) {
113-
return ConfigurationPropertyState.UNKNOWN;
114-
}
115-
116110
}
117111

118112
}

0 commit comments

Comments
 (0)