summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketsPage.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/TicketsPage.java b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java
index ecfed250..ebf4dc52 100644
--- a/src/main/java/com/gitblit/wicket/pages/TicketsPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java
@@ -521,14 +521,26 @@ public class TicketsPage extends RepositoryPage {
Collections.sort(openMilestones, new Comparator<TicketMilestone>() {
@Override
public int compare(TicketMilestone o1, TicketMilestone o2) {
- return o2.due.compareTo(o1.due);
+ if (o1.due == null) {
+ return (o2.due == null) ? 0 : 1;
+ } else if (o2.due == null) {
+ return -1;
+ } else {
+ return o1.due.compareTo(o2.due);
+ }
}
});
Collections.sort(closedMilestones, new Comparator<TicketMilestone>() {
@Override
public int compare(TicketMilestone o1, TicketMilestone o2) {
- return o2.due.compareTo(o1.due);
+ if (o1.due == null) {
+ return (o2.due == null) ? 0 : 1;
+ } else if (o2.due == null) {
+ return -1;
+ } else {
+ return o1.due.compareTo(o2.due);
+ }
}
});