| author | Steffen Pingel | 2012-02-06 09:41:14 (EST) |
|---|---|---|
| committer | Steffen Pingel | 2012-02-06 09:44:21 (EST) |
| commit | 7d67263e04e1b3a7f3c4cf5d43bb2dac725e6e3a (patch) (side-by-side diff) | |
| tree | ede5f78a57812f1a7de73607b8fb136ecf6329f0 | |
| parent | fdaa26f3d8ec744574f1fa1e5d6a4b8d88b757a6 (diff) | |
| download | org.eclipse.mylyn.tasks-7d67263e04e1b3a7f3c4cf5d43bb2dac725e6e3a.zip org.eclipse.mylyn.tasks-7d67263e04e1b3a7f3c4cf5d43bb2dac725e6e3a.tar.gz org.eclipse.mylyn.tasks-7d67263e04e1b3a7f3c4cf5d43bb2dac725e6e3a.tar.bz2 | |
REOPENED - bug 369697: ensure proper sorting of Trac priorities
https://bugs.eclipse.org/bugs/show_bug.cgi?id=369697
Change-Id: Id1c38a7fac04f36e7c36d9fb5ce8ac18b21e5cff
| -rw-r--r-- | org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java index 090851b..2b842db 100644 --- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java +++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java @@ -33,6 +33,31 @@ public class TracTicketAttribute implements Comparable<TracTicketAttribute>, Ser return value - o.value; } + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + TracTicketAttribute other = (TracTicketAttribute) obj; + if (name == null) { + if (other.name != null) { + return false; + } + } else if (!name.equals(other.name)) { + return false; + } + if (value != other.value) { + return false; + } + return true; + } + public String getName() { return name; } @@ -42,6 +67,15 @@ public class TracTicketAttribute implements Comparable<TracTicketAttribute>, Ser } @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + value; + return result; + } + + @Override public String toString() { return name; } |

