Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2014-08-19 11:52:39 +0000
committerMatthias Sohn2014-08-27 22:03:46 +0000
commitcde606c778a205a9f2ac96353a6353242e19beb0 (patch)
tree832f9fc6d210137a796fcecb4c41e6bfdf938f0e
parent6a77412c0ed95c72be837c2c983acb9e57afb6e6 (diff)
downloadegit-cde606c778a205a9f2ac96353a6353242e19beb0.tar.gz
egit-cde606c778a205a9f2ac96353a6353242e19beb0.tar.xz
egit-cde606c778a205a9f2ac96353a6353242e19beb0.zip
Fix IAE in Gerrit configuration page on null scheme
URIish#getScheme can return null, handle it. Change-Id: If2cc15049b449f490f67332b914a271075134847 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/gerrit/GerritConfigurationPage.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/gerrit/GerritConfigurationPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/gerrit/GerritConfigurationPage.java
index 6291137d3a..91a4149ead 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/gerrit/GerritConfigurationPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/gerrit/GerritConfigurationPage.java
@@ -281,7 +281,9 @@ class GerritConfigurationPage extends WizardPage {
private void checkPage() {
try {
pushURI = new URIish(uriText.getText());
- scheme.select(scheme.indexOf(pushURI.getScheme()));
+ String uriScheme = pushURI.getScheme();
+ if (uriScheme != null)
+ scheme.select(scheme.indexOf(uriScheme));
} catch (URISyntaxException e) {
setErrorMessage(e.getLocalizedMessage());
setPageComplete(false);

Back to the top