From f9081a2c23c66dceecd3187ffb7f03502ed251a8 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 29 Aug 2018 17:37:33 +0200 Subject: [PATCH] Revert "Polish some joining collectors" See gh-14221 --- .../endpoint/web/annotation/DiscoveredWebOperation.java | 4 ++-- .../endpoint/web/annotation/RequestPredicateFactory.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebOperation.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebOperation.java index 75eb021bf6..a2bc7071c7 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebOperation.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebOperation.java @@ -61,8 +61,8 @@ class DiscoveredWebOperation extends AbstractDiscoveredOperation implements WebO } private String getId(String endpointId, Method method) { - return Stream.of(method.getParameters()).filter(this::hasSelector) - .map(this::dashName).collect(Collectors.joining("", endpointId, "")); + return endpointId + Stream.of(method.getParameters()).filter(this::hasSelector) + .map(this::dashName).collect(Collectors.joining()); } private boolean hasSelector(Parameter parameter) { diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java index 1672fcb039..8ce5291b81 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java @@ -62,8 +62,8 @@ class RequestPredicateFactory { } private String getPath(String rootPath, Method method) { - return Stream.of(method.getParameters()).filter(this::hasSelector) - .map(this::slashName).collect(Collectors.joining("", rootPath, "")); + return rootPath + Stream.of(method.getParameters()).filter(this::hasSelector) + .map(this::slashName).collect(Collectors.joining()); } private boolean hasSelector(Parameter parameter) {