Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-06-09 16:11:48 -0400
committerspingel2010-06-09 16:11:48 -0400
commitb2f7d5535877378b91e62667e0978d2a3fede0fa (patch)
tree908ee1e4ab689e75b9aa42fb1fed0a55d6f037f5 /org.eclipse.mylyn.tasks.ui
parenta2d9ef55f67cf98607e97aa77020ae1d83297182 (diff)
downloadorg.eclipse.mylyn.tasks-b2f7d5535877378b91e62667e0978d2a3fede0fa.tar.gz
org.eclipse.mylyn.tasks-b2f7d5535877378b91e62667e0978d2a3fede0fa.tar.xz
org.eclipse.mylyn.tasks-b2f7d5535877378b91e62667e0978d2a3fede0fa.zip
NEW - bug 316261: NullPointerException in TaskEditorOutlineNode.parse(TaskEditorOutlineNode.java:132)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=316261
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java30
1 files changed, 16 insertions, 14 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java
index 854218280..8b20b2a4a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java
@@ -129,21 +129,23 @@ public class TaskEditorOutlineNode {
TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
TaskRepository taskRepository = manager.getRepository(taskData.getConnectorKind(),
taskData.getRepositoryUrl());
- for (TaskRelation taskRelation : relations) {
- ITask task = taskList.getTask(taskData.getRepositoryUrl(), taskRelation.getTaskId());
- String label;
- if (task != null) {
- label = NLS.bind(Messages.TaskEditorOutlineNode_TaskRelation_Label, new Object[] {
- taskRelation.getTaskId(), task.getSummary() });
- } else {
- label = NLS.bind(Messages.TaskEditorOutlineNode_TaskRelation_Label, new Object[] {
- taskRelation.getTaskId(), Messages.TaskEditorOutlineNode_unknown_Label });
- }
- TaskEditorOutlineNode childNode = new TaskEditorOutlineNode(label);
+ if (relations != null) {
+ for (TaskRelation taskRelation : relations) {
+ ITask task = taskList.getTask(taskData.getRepositoryUrl(), taskRelation.getTaskId());
+ String label;
+ if (task != null) {
+ label = NLS.bind(Messages.TaskEditorOutlineNode_TaskRelation_Label, new Object[] {
+ taskRelation.getTaskId(), task.getSummary() });
+ } else {
+ label = NLS.bind(Messages.TaskEditorOutlineNode_TaskRelation_Label, new Object[] {
+ taskRelation.getTaskId(), Messages.TaskEditorOutlineNode_unknown_Label });
+ }
+ TaskEditorOutlineNode childNode = new TaskEditorOutlineNode(label);
- childNode.setTaskRelation(taskRelation);
- childNode.setTaskRepository(taskRepository);
- relatedTasksNode.addChild(childNode);
+ childNode.setTaskRelation(taskRelation);
+ childNode.setTaskRepository(taskRepository);
+ relatedTasksNode.addChild(childNode);
+ }
}
TaskEditorOutlineNode attributesNode = new TaskEditorOutlineNode(LABEL_ATTRIBUTES);

Back to the top