Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2014-04-25 14:20:10 +0000
committerFred Bricon2014-04-25 14:20:10 +0000
commit42f039937949bdde9fe0c0cbc60df967cbd83d44 (patch)
treead81489e23472f81e54fd7d3bb1047b2caa411f0 /org.eclipse.m2e.scm
parentaaa276afcd310b24d97260ba156a3252e017c8d3 (diff)
downloadm2e-core-42f039937949bdde9fe0c0cbc60df967cbd83d44.tar.gz
m2e-core-42f039937949bdde9fe0c0cbc60df967cbd83d44.tar.xz
m2e-core-42f039937949bdde9fe0c0cbc60df967cbd83d44.zip
433520 : trim SCM URLs
Change-Id: Ic3e9fcd40b92006e61533b4e881e5f6f5792c168 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Diffstat (limited to 'org.eclipse.m2e.scm')
-rw-r--r--org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/internal/wizards/MavenCheckoutLocationPage.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/internal/wizards/MavenCheckoutLocationPage.java b/org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/internal/wizards/MavenCheckoutLocationPage.java
index 30af024d..7f10791d 100644
--- a/org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/internal/wizards/MavenCheckoutLocationPage.java
+++ b/org.eclipse.m2e.scm/src/org/eclipse/m2e/scm/internal/wizards/MavenCheckoutLocationPage.java
@@ -240,7 +240,7 @@ public class MavenCheckoutLocationPage extends AbstractMavenWizardPage {
scmUrlCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- final String url = scmUrlCombo.getText();
+ final String url = scmUrlCombo.getText().trim();
if(url.startsWith("scm:")) { //$NON-NLS-1$
try {
final String type = ScmUrl.getType(url);
@@ -425,11 +425,13 @@ public class MavenCheckoutLocationPage extends AbstractMavenWizardPage {
}
String type = null;
String url = scmUrls[0].getUrl();
- try {
- type = ScmUrl.getType(url);
- } catch(CoreException ignore) {
+ if(url != null) {
+ try {
+ type = ScmUrl.getType(url);
+ } catch(CoreException ignore) {
+ }
}
- return ("scm:" + type + ":").equals(url);
+ return url == null || url.isEmpty() || ("scm:" + type + ":").equals(url);
}
public void setParent(String parentUrl) {

Back to the top