Replace lambdas with method reference or call
Closes gh-14937
This commit is contained in:
parent
eb61b2bbde
commit
4857b45ea5
|
@ -123,8 +123,7 @@ public class ConditionsReportEndpoint {
|
|||
this.negativeMatches = new LinkedHashMap<>();
|
||||
this.exclusions = report.getExclusions();
|
||||
this.unconditionalClasses = report.getUnconditionalClasses();
|
||||
report.getConditionAndOutcomesBySource().forEach(
|
||||
(source, conditionAndOutcomes) -> add(source, conditionAndOutcomes));
|
||||
report.getConditionAndOutcomesBySource().forEach(this::add);
|
||||
this.parentId = (context.getParent() != null) ? context.getParent().getId()
|
||||
: null;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.Map;
|
|||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -147,7 +148,7 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
|
|||
|
||||
private void addExtensionBeans(Collection<EndpointBean> endpointBeans) {
|
||||
Map<EndpointId, EndpointBean> byId = endpointBeans.stream()
|
||||
.collect(Collectors.toMap(EndpointBean::getId, (bean) -> bean));
|
||||
.collect(Collectors.toMap(EndpointBean::getId, Function.identity()));
|
||||
String[] beanNames = BeanFactoryUtils.beanNamesForAnnotationIncludingAncestors(
|
||||
this.applicationContext, EndpointExtension.class);
|
||||
for (String beanName : beanNames) {
|
||||
|
|
|
@ -49,7 +49,7 @@ public interface PathMapper {
|
|||
*/
|
||||
@Deprecated
|
||||
static PathMapper useEndpointId() {
|
||||
return (id) -> id.toString();
|
||||
return EndpointId::toString;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -80,8 +80,7 @@ public class CassandraAutoConfiguration {
|
|||
map.from(this::getSocketOptions).to(builder::withSocketOptions);
|
||||
map.from(properties::isSsl).whenTrue().toCall(builder::withSSL);
|
||||
map.from(this::getPoolingOptions).to(builder::withPoolingOptions);
|
||||
map.from(properties::getContactPoints)
|
||||
.as((list) -> StringUtils.toStringArray(list))
|
||||
map.from(properties::getContactPoints).as(StringUtils::toStringArray)
|
||||
.to(builder::addContactPoints);
|
||||
map.from(properties::isJmxEnabled).whenFalse()
|
||||
.toCall(builder::withoutJMXReporting);
|
||||
|
|
Loading…
Reference in New Issue