Skip to content

Commit f0f999a

Browse files
committed
Merge branch '2.0.x'
2 parents 31b0fc2 + 5d219bc commit f0f999a

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/MappingWebEndpointPathMapper.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import org.springframework.boot.actuate.endpoint.EndpointId;
2323
import org.springframework.boot.actuate.endpoint.web.PathMapper;
24+
import org.springframework.util.StringUtils;
2425

2526
/**
2627
* A {@link PathMapper} implementation that uses a simple {@link Map} to determine the
@@ -40,7 +41,9 @@ class MappingWebEndpointPathMapper implements PathMapper {
4041

4142
@Override
4243
public String getRootPath(EndpointId endpointId) {
43-
return this.pathMapping.getOrDefault(endpointId, endpointId.toString());
44+
String path = this.pathMapping.get(endpointId);
45+
return StringUtils.hasText(path) ? path
46+
: PathMapper.useEndpointId().getRootPath(endpointId);
4447
}
4548

4649
}

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/couchbase/CouchbaseHealthIndicator.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,7 @@ public CouchbaseHealthIndicator(Cluster cluster) {
5555
@Override
5656
protected void doHealthCheck(Health.Builder builder) throws Exception {
5757
DiagnosticsReport diagnostics = this.cluster.diagnostics();
58-
if (isCouchbaseUp(diagnostics)) {
59-
builder.up();
60-
}
61-
else {
62-
builder.down();
63-
}
58+
builder = isCouchbaseUp(diagnostics) ? builder.up() : builder.down();
6459
builder.withDetail("sdk", diagnostics.sdk());
6560
builder.withDetail("endpoints", diagnostics.endpoints().stream()
6661
.map(this::describe).collect(Collectors.toList()));

0 commit comments

Comments
 (0)