Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
4226:cb9f22c3553f | 4227:8138a90a674a |
---|---|
122 if (getKind() == 0 && o.getKind() != 0) { | 122 if (getKind() == 0 && o.getKind() != 0) { |
123 return 1; | 123 return 1; |
124 } | 124 } |
125 | 125 |
126 TimeInterval other = o.getTimeInterval(); | 126 TimeInterval other = o.getTimeInterval(); |
127 if (other == null && timeInterval == null) { | |
128 return 1; | |
129 } | |
130 else if (other == null) { | |
131 return -1; | |
132 } | |
133 else if (timeInterval == null) { | |
134 return 1; | |
135 } | |
127 | 136 |
128 Date otherStartTime = other.getStartTime(); | 137 Date otherStartTime = other.getStartTime(); |
129 Date thisStartTime = timeInterval.getStartTime(); | 138 Date thisStartTime = timeInterval.getStartTime(); |
130 | 139 |
131 if (otherStartTime == null) { | 140 if (otherStartTime == null) { |