Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-02-01 14:21:57 +0000
committerSteffen Pingel2012-02-01 14:21:57 +0000
commitf5a4363ddac9896c18eafbaab0bd5c69ffb6c091 (patch)
treef5d61165a37274d5094f2eab080fdcd4ccd64930
parent12aade69feda2c25f17999246cb7b37ba272a8ef (diff)
downloadorg.eclipse.mylyn.tasks-f5a4363ddac9896c18eafbaab0bd5c69ffb6c091.tar.gz
org.eclipse.mylyn.tasks-f5a4363ddac9896c18eafbaab0bd5c69ffb6c091.tar.xz
org.eclipse.mylyn.tasks-f5a4363ddac9896c18eafbaab0bd5c69ffb6c091.zip
NEW - bug 369697: fix test failures on Java 1.7
https://bugs.eclipse.org/bugs/show_bug.cgi?id=369697
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java3
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java3
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java2
3 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java
index 66dd96a81..20ec91a39 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java
@@ -136,7 +136,8 @@ public class TaskDataStore {
return readStateInternal(file, false);
} catch (SAXException e) {
// bug 268456: if reading fails, try again using a different XML version
- if (e.getMessage() != null && e.getMessage().contains("invalid XML character")) { //$NON-NLS-1$
+ if (e.getMessage() != null
+ && (e.getMessage().contains("invalid XML character") || e.getMessage().contains("Character reference \"&#"))) { //$NON-NLS-1$ //$NON-NLS-2$
return readStateInternal(file, true);
} else {
throw e;
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java
index 896c9c720..5b8a3485a 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java
@@ -38,11 +38,12 @@ import org.eclipse.mylyn.tasks.tests.ui.editor.TaskUrlHyperlinkDetectorTest;
/**
* @author Mik Kersten
* @author Shawn Minto
+ * @author Steffen Pingel
*/
public class AllTasksTests {
public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.tasks.tests");
+ TestSuite suite = new TestSuite(AllTasksTests.class.getName());
suite.addTestSuite(TasksUiUtilTest.class);
suite.addTestSuite(TaskListUiTest.class);
suite.addTestSuite(TaskRepositoryTest.class);
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java
index 2a7a476d5..b384d9855 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java
@@ -30,6 +30,7 @@ import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
import org.eclipse.mylyn.resources.tests.ResourceTestUtil;
import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
+import org.eclipse.mylyn.tests.util.TestFixture;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
@@ -52,6 +53,7 @@ public class TaskWorkingSetTest extends TestCase {
protected void setUp() throws Exception {
workingSetManager = Workbench.getInstance().getWorkingSetManager();
root = ResourcesPlugin.getWorkspace().getRoot();
+ TestFixture.resetTaskList();
}
@Override

Back to the top