Skip to content

Commit 2bce987

Browse files
Alexander OstAlexander Ost
authored andcommitted
Do not reset URI path for Checks API
Fixes issue JENKINS-63887.
1 parent 4d62dcb commit 2bce987

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/main/java/com/google/gerrit/plugins/checks/client/Checkers.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ private URI buildRequestUrl() throws URISyntaxException {
103103

104104
private URI buildRequestUrl(String suffixPath) throws URISyntaxException {
105105
return uriBuilder
106-
.setPath(String.format("%splugins/checks/checkers/%s", getPrefix(), suffixPath))
106+
.setPath(
107+
String.format(
108+
"%splugins/checks/checkers/%s", uriBuilder.getPath() + getPrefix(), suffixPath))
107109
.build();
108110
}
109111
}

src/main/java/com/google/gerrit/plugins/checks/client/Checks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private URI buildRequestUrl(String suffixPath) throws URISyntaxException {
161161
.setPath(
162162
String.format(
163163
"%schanges/%d/revisions/%d/checks/%s",
164-
getPrefix(), changeNumber, patchSetNumber, suffixPath))
164+
uriBuilder.getPath() + getPrefix(), changeNumber, patchSetNumber, suffixPath))
165165
.build();
166166
}
167167
}

src/main/java/com/google/gerrit/plugins/checks/client/PendingChecks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ private URI buildRequestUrl() throws URISyntaxException {
8282
}
8383
uriBuilder.setParameter("query", queryString.toString());
8484
}
85-
return uriBuilder.setPath(getPrefix() + PENDING_CHECKS_PATH).build();
85+
return uriBuilder.setPath(uriBuilder.getPath() + getPrefix() + PENDING_CHECKS_PATH).build();
8686
}
8787
}

0 commit comments

Comments
 (0)