Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2009-12-12 16:56:30 -0500
committerfbecker2009-12-12 16:56:30 -0500
commite939a835d0bdc5fd57cb217d0ef6aa3e7a5e9b20 (patch)
tree2ce85d78a4f957c1a600f47b59aadf39eaea0c75
parent6a1432bd4f7f932b161febedc32a0d31366e290c (diff)
downloadorg.eclipse.mylyn.tasks-e939a835d0bdc5fd57cb217d0ef6aa3e7a5e9b20.tar.gz
org.eclipse.mylyn.tasks-e939a835d0bdc5fd57cb217d0ef6aa3e7a5e9b20.tar.xz
org.eclipse.mylyn.tasks-e939a835d0bdc5fd57cb217d0ef6aa3e7a5e9b20.zip
NEW - bug 290465: fix Bugzilla test suite
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290465
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskHyperlinkDetectorTest.java9
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java3
2 files changed, 10 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskHyperlinkDetectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskHyperlinkDetectorTest.java
index 4552f7017..fbcf363b8 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskHyperlinkDetectorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskHyperlinkDetectorTest.java
@@ -247,9 +247,14 @@ public class BugzillaTaskHyperlinkDetectorTest extends TestCase {
assertNotNull(links);
assertEquals(2, links.length);
assertTrue(links[0] instanceof TaskHyperlink);
- assertEquals(((TaskHyperlink) links[0]).getRepository(), repository1);
assertTrue(links[1] instanceof TaskHyperlink);
- assertEquals(((TaskHyperlink) links[1]).getRepository(), repository2);
+
+ // order of repository is not defined so we must test the two cases
+ if (((TaskHyperlink) links[0]).getRepository() == repository1) {
+ assertEquals(((TaskHyperlink) links[1]).getRepository(), repository2);
+ } else {
+ assertEquals(((TaskHyperlink) links[0]).getRepository(), repository2);
+ }
}
public void testRepositoryInViewTwoRepositoryInManager() {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
index 87c0dc5d9..6037a022a 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
@@ -196,6 +196,9 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
start = m.start() + m.group().indexOf(m.group(TASK_NUM_GROUP));
} else {
start = m.start();
+ if (m.group().startsWith(" ")) { //$NON-NLS-1$
+ start++;
+ }
}
int end = m.end();

Back to the top