Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2009-03-05 17:43:37 -0500
committermkersten2009-03-05 17:43:37 -0500
commit663541b7b2a1851751bebf91b6d7b67d28a31203 (patch)
treef7be526a933b715d7d9449f41a228cfb057c8733
parentca0cd9f814e7cda43f37dadf5bee283aa814b7b4 (diff)
downloadorg.eclipse.mylyn.tasks-663541b7b2a1851751bebf91b6d7b67d28a31203.tar.gz
org.eclipse.mylyn.tasks-663541b7b2a1851751bebf91b6d7b67d28a31203.tar.xz
org.eclipse.mylyn.tasks-663541b7b2a1851751bebf91b6d7b67d28a31203.zip
NEW - bug 267143: [performance][context] expand all causes expensive computations in InterestFilter
https://bugs.eclipse.org/bugs/show_bug.cgi?id=267143
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java1
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java35
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java1
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java1
4 files changed, 9 insertions, 29 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
index 0690e4d04..3a8574ff9 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
@@ -199,7 +199,6 @@ public class BugzillaConfigurationTest extends TestCase {
// incoming.append("</RDF>");
//
// StringBuffer result = XmlCleaner.clean(new StringReader(incoming.toString()));
-// System.err.println(result);
// }
/**
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java
index e2d388e28..e66c22639 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java
@@ -128,36 +128,19 @@ public class BugzillaTaskHistoryTest extends AbstractBugzillaTest {
assertTrue(storedHistoryFile.delete());
}
- private void storeHistory(TaskHistory history) {
+ private void storeHistory(TaskHistory history) throws FileNotFoundException, IOException {
File saveFile = new File(HISTORY_FILE_NAME);
saveFile.deleteOnExit();
- try {
- ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(saveFile));
- out.writeObject(history);
- out.close();
- } catch (FileNotFoundException e) {
- System.err.println("Can't write to: " + saveFile);
- } catch (IOException e) {
- e.printStackTrace();
- }
+ ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(saveFile));
+ out.writeObject(history);
+ out.close();
}
- private TaskHistory getStoredHistory() {
+ private TaskHistory getStoredHistory() throws FileNotFoundException, IOException, ClassNotFoundException {
File file = new File(HISTORY_FILE_NAME);
- try {
- ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));
- TaskHistory history = (TaskHistory) in.readObject();
- in.close();
- return history;
- } catch (FileNotFoundException e) {
- System.err.println("Can't find: " + file);
- } catch (IOException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }
-
- // Should never happen
- return null;
+ ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));
+ TaskHistory history = (TaskHistory) in.readObject();
+ in.close();
+ return history;
}
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java
index 1c5654819..44edf4a68 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java
@@ -182,7 +182,6 @@ public class TaskActivationHistoryTest extends TestCase {
previousTaskAction.run();
// order (1) 2 3
- System.err.println(taskActivityManager.getTaskActivationHistory().getPreviousTasks());
assertEquals(task1, taskActivityManager.getActiveTask());
assertTrue(task1.isActive());
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java
index e491bd5ad..7963ca351 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java
@@ -62,7 +62,6 @@ public class TaskDataExternalizerTest extends TestCase {
}
ByteArrayOutputStream out = new ByteArrayOutputStream();
externalizer.writeState(out, state);
- System.err.println(new String(out.toByteArray()));
TaskDataState state2 = externalizer.readState(new ByteArrayInputStream(out.toByteArray()));
assertEquals(state.getConnectorKind(), state2.getConnectorKind());
assertEquals(state.getRepositoryUrl(), state2.getRepositoryUrl());

Back to the top