Polish lambda expression and method reference

See gh-49023

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
Yanming Zhou
2026-01-30 18:46:24 +01:00
committed by Stéphane Nicoll
parent 09026cd4d8
commit 42e55c0cf7
3 changed files with 3 additions and 3 deletions
@@ -160,7 +160,7 @@ public class PrometheusPushGatewayManager {
@Override
public ScheduledExecutorService getScheduledExecutor() throws IllegalStateException {
return Executors.newSingleThreadScheduledExecutor(this::newThread);
return Executors.newSingleThreadScheduledExecutor(this);
}
}
@@ -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))
@@ -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