Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/model/DischargeTable.java @ 4227:8138a90a674a
Be more tolerant with empty time intervals in discharge tables while comparing discharge tables.
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 23 Oct 2012 15:46:31 +0200 |
parents | 7d4480c0e68e |
children | 20b6ebf23916 |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/model/DischargeTable.java Tue Oct 23 15:05:17 2012 +0200 +++ b/flys-backend/src/main/java/de/intevation/flys/model/DischargeTable.java Tue Oct 23 15:46:31 2012 +0200 @@ -124,6 +124,15 @@ } TimeInterval other = o.getTimeInterval(); + if (other == null && timeInterval == null) { + return 1; + } + else if (other == null) { + return -1; + } + else if (timeInterval == null) { + return 1; + } Date otherStartTime = other.getStartTime(); Date thisStartTime = timeInterval.getStartTime();