Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Muskalla2012-05-08 14:21:06 +0000
committerSteffen Pingel2012-05-08 14:21:06 +0000
commitaa9a8b34ef6bc4246547e0c59679cc196b8a4a8b (patch)
tree08cd8d7a0f52a811fdcf683351998b5b40bb9094 /org.eclipse.mylyn.trac.ui
parent60794da2e6020530526debe41ebfbd184fb85580 (diff)
downloadorg.eclipse.mylyn.tasks-aa9a8b34ef6bc4246547e0c59679cc196b8a4a8b.tar.gz
org.eclipse.mylyn.tasks-aa9a8b34ef6bc4246547e0c59679cc196b8a4a8b.tar.xz
org.eclipse.mylyn.tasks-aa9a8b34ef6bc4246547e0c59679cc196b8a4a8b.zip
NEW - bug 376939: provide default impl for isValidUrl in settings page
https://bugs.eclipse.org/bugs/show_bug.cgi?id=376939 Change-Id: Iabf75ddfc19781b759425420206a2f924aae93c7
Diffstat (limited to 'org.eclipse.mylyn.trac.ui')
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
index f08378049..a3265255a 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
@@ -13,7 +13,6 @@
package org.eclipse.mylyn.internal.trac.ui.wizard;
import java.net.MalformedURLException;
-import java.net.URL;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -124,15 +123,9 @@ public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
}
@Override
- protected boolean isValidUrl(String name) {
- if ((name.startsWith(URL_PREFIX_HTTPS) || name.startsWith(URL_PREFIX_HTTP)) && !name.endsWith("/")) { //$NON-NLS-1$
- try {
- new URL(name);
- return true;
- } catch (MalformedURLException e) {
- }
- }
- return false;
+ protected boolean isValidUrl(String url) {
+ boolean isValid = super.isValidUrl(url);
+ return isValid && !url.endsWith("/"); //$NON-NLS-1$
}
public Version getTracVersion() {

Back to the top