Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2016-09-10 04:28:38 -0400
committerGerrit Code Review @ Eclipse.org2016-09-13 22:52:07 -0400
commit384acbe8f6281410589c59861cbe366a839db62f (patch)
tree38170591b70aa09babba3d92cac69aa022979d19 /org.eclipse.mylyn.tasks.core/src/org
parent0a9788f6c94f7c45a62add3f41c84d348b8f7765 (diff)
downloadorg.eclipse.mylyn.tasks-384acbe8f6281410589c59861cbe366a839db62f.tar.gz
org.eclipse.mylyn.tasks-384acbe8f6281410589c59861cbe366a839db62f.tar.xz
org.eclipse.mylyn.tasks-384acbe8f6281410589c59861cbe366a839db62f.zip
501177: RepositoryPerson.toString() should only return name<id> if not
same Change-Id: Iaae4c7c8363afa4471a1dc5b99bd818c9ca087e2 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=501177
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src/org')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java
index e5529a484..5b85d6916 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java
@@ -84,8 +84,13 @@ public class RepositoryPerson implements IRepositoryPerson {
@Override
public String toString() {
+
if (getName() == null) {
return getPersonId();
+ } else if (getPersonId() == null) {
+ return getName();
+ } else if (getName().equals(getPersonId())) {
+ return getName();
} else {
return getName() + " <" + getPersonId() + ">"; //$NON-NLS-1$ //$NON-NLS-2$
}

Back to the top