Skip to content

Commit

Permalink
Fix RestClient.buildURI overwriting existing baseUrl path
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoschwald committed Jan 17, 2024
1 parent 34249f2 commit 8165930
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/net/rcarz/jiraclient/RestClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ public URI buildURI(String path) throws URISyntaxException {
*/
public URI buildURI(String path, Map<String, String> params) throws URISyntaxException {
URIBuilder ub = new URIBuilder(uri);
ub.setPath(path);
if (ub.getPath() == null) {
ub.setPath(path);
} else {
ub.setPath(ub.getPath() + path);
}

if (params != null) {
for (Map.Entry<String, String> ent : params.entrySet())
Expand Down

0 comments on commit 8165930

Please sign in to comment.