Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2015-04-08 22:36:38 +0000
committerMatthias Sohn2015-04-27 21:21:56 +0000
commitd1bee04b0a7a5a09334c96968b5f19b8ccdf98ae (patch)
tree8fa9e70bb033f9b5b2a4aa28b63cbd5f18e7cdb7
parentac816dbba30f29194e60d642de1f1d7727f4d8f0 (diff)
downloadegit-d1bee04b0a7a5a09334c96968b5f19b8ccdf98ae.tar.gz
egit-d1bee04b0a7a5a09334c96968b5f19b8ccdf98ae.tar.xz
egit-d1bee04b0a7a5a09334c96968b5f19b8ccdf98ae.zip
Fix StringIndexOutOfBoundsException in ConfigureGerritAfterCloneTask
Bug: 464213 Change-Id: I1ec4c00a8069e0f782080d3d51c315a1a79dcee0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java
index 7ce6be3096..0a76a58a0c 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java
@@ -127,7 +127,8 @@ public class ConfigureGerritAfterCloneTask implements PostCloneTask {
}
if (path != null && (HTTP.equals(s) || HTTPS.equals(s))) {
- String baseURL = uri.substring(0, uri.lastIndexOf(path));
+ String baseURL = u.setPath("/").toString(); //$NON-NLS-1$
+ baseURL = baseURL.substring(0, baseURL.length() - 1);
String tmpPath = ""; //$NON-NLS-1$
HttpURLConnection httpConnection = null;
try {

Back to the top