From f96f29171fc3a4d4e3ae58911046136a3fed08e9 Mon Sep 17 00:00:00 2001 From: Tim Su Date: Sun, 23 May 2010 23:48:59 -0700 Subject: [PATCH] Fix classpath for Astrid & tests, fixed NPE in TasksXmlExporter. --- astrid/.classpath | 1 - .../src-legacy/com/timsu/astrid/utilities/TasksXmlExporter.java | 2 ++ tests/.classpath | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/astrid/.classpath b/astrid/.classpath index 24a48e061..120d63f4f 100644 --- a/astrid/.classpath +++ b/astrid/.classpath @@ -4,7 +4,6 @@ - diff --git a/astrid/src-legacy/com/timsu/astrid/utilities/TasksXmlExporter.java b/astrid/src-legacy/com/timsu/astrid/utilities/TasksXmlExporter.java index 2d2b8fa0e..cd4f67ba1 100644 --- a/astrid/src-legacy/com/timsu/astrid/utilities/TasksXmlExporter.java +++ b/astrid/src-legacy/com/timsu/astrid/utilities/TasksXmlExporter.java @@ -71,6 +71,8 @@ public class TasksXmlExporter { throws IOException { LinkedList tags = tagController.getTaskTags(task); for (TagIdentifier tag : tags) { + if(!tagMap.containsKey(tag) || tagMap.get(tag) == null) + continue; xml.startTag(null, TAG_TAG); xml.attribute(null, TAG_ATTR_NAME, tagMap.get(tag).toString()); xml.endTag(null, TAG_TAG); diff --git a/tests/.classpath b/tests/.classpath index 8a84e1a23..1f0940313 100644 --- a/tests/.classpath +++ b/tests/.classpath @@ -3,6 +3,6 @@ - +