summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaša Živkov <sasa.zivkov@sap.com>2019-03-21 17:26:19 +0100
committerDavid Pursehouse <dpursehouse@collab.net>2019-05-13 13:01:59 +0200
commitf9c6f8d875bb44fd636011dc8c16308b57d90dd1 (patch)
treecf11a11b32990bb6466c63228174540975b7ced1
parent1c82d0a26c43eefd1f37c1428e92ca80ea9a8be0 (diff)
Avoid double slash in REST calls made from the GerritRestApiv3.0.0
-rw-r--r--src/main/java/com/googlesource/gerrit/plugins/replication/GerritRestApi.java4
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;
}
}