Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-08-18 02:01:43 -0400
committerspingel2008-08-18 02:01:43 -0400
commit7dff5c9024f1cd141c267abdebd9a643aa723c37 (patch)
treedd98be2ca8e6ce1cf5e3f004b4101e42a1a8ec54
parent799d44916e06b7e48d760a27b9b39fd38c8f5df5 (diff)
downloadorg.eclipse.mylyn.tasks-7dff5c9024f1cd141c267abdebd9a643aa723c37.tar.gz
org.eclipse.mylyn.tasks-7dff5c9024f1cd141c267abdebd9a643aa723c37.tar.xz
org.eclipse.mylyn.tasks-7dff5c9024f1cd141c267abdebd9a643aa723c37.zip
NEW - bug 239426: NPE when synchronizing Trac query
https://bugs.eclipse.org/bugs/show_bug.cgi?id=239426
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
index 4c118883c..4b3108290 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
@@ -146,15 +146,19 @@ public class TracTaskDataHandler extends AbstractTaskDataHandler {
Map<String, String> valueByKey = ticket.getValues();
for (String key : valueByKey.keySet()) {
TaskAttribute taskAttribute = data.getRoot().getAttribute(key);
- if (Key.CC.getKey().equals(key)) {
- StringTokenizer t = new StringTokenizer(valueByKey.get(key), CC_DELIMETER);
- while (t.hasMoreTokens()) {
- taskAttribute.addValue(t.nextToken());
+ if (taskAttribute != null) {
+ if (Key.CC.getKey().equals(key)) {
+ StringTokenizer t = new StringTokenizer(valueByKey.get(key), CC_DELIMETER);
+ while (t.hasMoreTokens()) {
+ taskAttribute.addValue(t.nextToken());
+ }
+ } else {
+ taskAttribute.setValue(valueByKey.get(key));
}
+ changedAttributes.add(taskAttribute);
} else {
- taskAttribute.setValue(valueByKey.get(key));
+ // TODO log missing attribute?
}
- changedAttributes.add(taskAttribute);
}
TracComment[] comments = ticket.getComments();

Back to the top