mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Polish lambda expression and method reference
See gh-49023 Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
committed by
Stéphane Nicoll
parent
09026cd4d8
commit
42e55c0cf7
+1
-1
@@ -160,7 +160,7 @@ public class PrometheusPushGatewayManager {
|
||||
|
||||
@Override
|
||||
public ScheduledExecutorService getScheduledExecutor() throws IllegalStateException {
|
||||
return Executors.newSingleThreadScheduledExecutor(this::newThread);
|
||||
return Executors.newSingleThreadScheduledExecutor(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class AutoConfigurations extends Configurations implements Ordered {
|
||||
private static UnaryOperator<Collection<Class<?>>> sorter(UnaryOperator<String> replacementMapper) {
|
||||
AutoConfigurationSorter sorter = new AutoConfigurationSorter(metadataReaderFactory, null, replacementMapper);
|
||||
return (classes) -> {
|
||||
List<String> names = classes.stream().map(Class::getName).map(replacementMapper::apply).toList();
|
||||
List<String> names = classes.stream().map(Class::getName).map(replacementMapper).toList();
|
||||
List<String> sorted = sorter.getInPriorityOrder(names);
|
||||
return sorted.stream()
|
||||
.map((className) -> ClassUtils.resolveClassName(className, null))
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public class SpringBootPropertySource implements PropertySource {
|
||||
|
||||
@Override
|
||||
public void forEach(BiConsumer<String, String> action) {
|
||||
this.properties.forEach(action::accept);
|
||||
this.properties.forEach(action);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user