Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 150890
Collapse All | Expand All

(-)src/org/eclipse/mylar/internal/jira/ui/wizards/JiraRepositorySettingsPage.java (-1 / +1 lines)
Lines 67-73 Link Here
67
//		} else {
67
//		} else {
68
//			MessageDialog.openInformation(null, MylarJiraPlugin.TITLE_MESSAGE_DIALOG, MESSAGE_FAILURE_CONNECT);
68
//			MessageDialog.openInformation(null, MylarJiraPlugin.TITLE_MESSAGE_DIALOG, MESSAGE_FAILURE_CONNECT);
69
//		}
69
//		}
70
		final String serverUrl = super.serverUrlEditor.getStringValue();
70
		final String serverUrl = getServerUrl();
71
		final String userName = getUserName();
71
		final String userName = getUserName();
72
		final String password = getPassword();
72
		final String password = getPassword();
73
		try {
73
		try {
(-)src/org/eclipse/mylar/internal/tasks/ui/wizards/AbstractRepositorySettingsPage.java (-2 / +12 lines)
Lines 320-331 Link Here
320
320
321
	protected abstract boolean isValidUrl(String name);
321
	protected abstract boolean isValidUrl(String name);
322
322
323
	/* Public for testing. */
324
	public static String stripSlashes(String url) {
325
		StringBuilder sb = new StringBuilder(url.trim());
326
		while (sb.length() > 0 && sb.charAt(sb.length() - 1) == '/') {
327
			sb.deleteCharAt(sb.length() - 1);
328
		}
329
		return sb.toString();
330
	}
331
323
	public String getRepositoryLabel() {
332
	public String getRepositoryLabel() {
324
		return repositoryLabelCombo.getText();
333
		return repositoryLabelCombo.getText();
325
	}
334
	}
326
335
327
	public String getServerUrl() {
336
	public String getServerUrl() {
328
		return serverUrlEditor.getStringValue();
337
		return stripSlashes(serverUrlEditor.getStringValue());
329
	}
338
	}
330
339
331
	public String getUserName() {
340
	public String getUserName() {
Lines 372-378 Link Here
372
381
373
	@Override
382
	@Override
374
	public boolean isPageComplete() {
383
	public boolean isPageComplete() {
375
		return isUniqueUrl(serverUrlEditor.getStringValue()) && isValidUrl(serverUrlEditor.getStringValue());
384
		String url = getServerUrl();
385
		return isUniqueUrl(url) && isValidUrl(url);
376
	}
386
	}
377
387
378
	protected boolean isUniqueUrl(String urlString) {
388
	protected boolean isUniqueUrl(String urlString) {

Return to bug 150890