Commit 801deb98 authored by thomas's avatar thomas
Browse files

[22350] fix SelectBestellungDialog table viewer comparator

parent 49a5624a
Pipeline #19519 passed with stages
in 2 minutes and 21 seconds
......@@ -102,11 +102,13 @@ public class SelectBestellungDialog extends SelectionDialog {
public int compare(Viewer viewer, Object b1, Object b2){
setTimeTool((Bestellung) b1, t1);
setTimeTool((Bestellung) b2, t2);
if (t1.after(t2))
if (t1.after(t2)) {
return -1;
if (t2.after(t1))
} else if (t2.after(t1)) {
return 1;
return 0;
}
return Long.valueOf(((Bestellung) b1).getLastUpdate())
.compareTo(Long.valueOf(((Bestellung) b2).getLastUpdate()));
}
private void setTimeTool(Bestellung bestellung, TimeTool timeTool){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment