Revert "Polish some joining collectors"

See gh-14221
pull/14268/head
Stephane Nicoll 6 years ago
parent 3155abae5a
commit f9081a2c23

@ -61,8 +61,8 @@ class DiscoveredWebOperation extends AbstractDiscoveredOperation implements WebO
} }
private String getId(String endpointId, Method method) { private String getId(String endpointId, Method method) {
return Stream.of(method.getParameters()).filter(this::hasSelector) return endpointId + Stream.of(method.getParameters()).filter(this::hasSelector)
.map(this::dashName).collect(Collectors.joining("", endpointId, "")); .map(this::dashName).collect(Collectors.joining());
} }
private boolean hasSelector(Parameter parameter) { private boolean hasSelector(Parameter parameter) {

@ -62,8 +62,8 @@ class RequestPredicateFactory {
} }
private String getPath(String rootPath, Method method) { private String getPath(String rootPath, Method method) {
return Stream.of(method.getParameters()).filter(this::hasSelector) return rootPath + Stream.of(method.getParameters()).filter(this::hasSelector)
.map(this::slashName).collect(Collectors.joining("", rootPath, "")); .map(this::slashName).collect(Collectors.joining());
} }
private boolean hasSelector(Parameter parameter) { private boolean hasSelector(Parameter parameter) {

Loading…
Cancel
Save