Skip to content

Commit

Permalink
Modify CollectorResourceVisitor so that it does not create extra slas…
Browse files Browse the repository at this point in the history
…h with empty path
  • Loading branch information
dankellymn committed Jul 13, 2018
1 parent 750948a commit 1e06d2f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static List<Param> expand(List<Param> in) {
public ResourceVisitor path(String path) {
if (path.endsWith("/")) path = path.substring(0, path.length() - 1); // strip off trailing slash
if (path.matches(ABSOLUTE_PATH)) this.paths = new ArrayList<>(singleton(path)); // reset current path
else this.paths.add(path.startsWith("/") ? path : "/" + path);
else this.paths.add( (path.isEmpty() || path.startsWith("/")) ? path : "/" + path);
return this;
}

Expand Down

0 comments on commit 1e06d2f

Please sign in to comment.