diff options
author | Saša Živkov <sasa.zivkov@sap.com> | 2019-03-21 17:26:19 +0100 |
---|---|---|
committer | David Pursehouse <dpursehouse@collab.net> | 2019-05-13 13:01:59 +0200 |
commit | f9c6f8d875bb44fd636011dc8c16308b57d90dd1 (patch) | |
tree | cf11a11b32990bb6466c63228174540975b7ced1 | |
parent | 1c82d0a26c43eefd1f37c1428e92ca80ea9a8be0 (diff) |
Avoid double slash in REST calls made from the GerritRestApiv3.0.0
Change-Id: I2742411bc801e113e487bf5c9cbb26ede35d2bd5
-rw-r--r-- | src/main/java/com/googlesource/gerrit/plugins/replication/GerritRestApi.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/GerritRestApi.java b/src/main/java/com/googlesource/gerrit/plugins/replication/GerritRestApi.java index 91fe20a..55fbed1 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/GerritRestApi.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/GerritRestApi.java @@ -125,8 +125,8 @@ public class GerritRestApi implements AdminApi { u = u.substring(GERRIT_ADMIN_PROTOCOL_PREFIX.length()); } if (u.endsWith("/")) { - return u; + return u.substring(0, u.length() - 1); } - return u + "/"; + return u; } } |