Skip to content

Commit 3155aba

Browse files
committed
Merge pull request #14221 from dreis2211:polish-joining-collectors
* pr/14221: Polish some joining collectors
2 parents 3997b3a + afda71e commit 3155aba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ class DiscoveredWebOperation extends AbstractDiscoveredOperation implements WebO
6161
}
6262

6363
private String getId(String endpointId, Method method) {
64-
return endpointId + Stream.of(method.getParameters()).filter(this::hasSelector)
65-
.map(this::dashName).collect(Collectors.joining());
64+
return Stream.of(method.getParameters()).filter(this::hasSelector)
65+
.map(this::dashName).collect(Collectors.joining("", endpointId, ""));
6666
}
6767

6868
private boolean hasSelector(Parameter parameter) {

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public WebOperationRequestPredicate getRequestPredicate(String endpointId,
6262
}
6363

6464
private String getPath(String rootPath, Method method) {
65-
return rootPath + Stream.of(method.getParameters()).filter(this::hasSelector)
66-
.map(this::slashName).collect(Collectors.joining());
65+
return Stream.of(method.getParameters()).filter(this::hasSelector)
66+
.map(this::slashName).collect(Collectors.joining("", rootPath, ""));
6767
}
6868

6969
private boolean hasSelector(Parameter parameter) {

0 commit comments

Comments
 (0)