Skip to content

Commit

Permalink
Polish some joining collectors
Browse files Browse the repository at this point in the history
  • Loading branch information
dreis2211 authored and snicoll committed Aug 28, 2018
1 parent 3997b3a commit afda71e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public WebOperationRequestPredicate getRequestPredicate(String endpointId,
}

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) {
Expand Down

0 comments on commit afda71e

Please sign in to comment.