Polish some joining collectors

Closes gh-14221
This commit is contained in:
dreis2211 2018-08-28 16:36:08 +02:00 committed by Stephane Nicoll
parent 3997b3ae5e
commit afda71e419
2 changed files with 4 additions and 4 deletions

View File

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

View File

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