# HG changeset patch # User Ingo Weinzierl # Date 1350999991 -7200 # Node ID 8138a90a674ae0a1ef3fa43402f17d950c92445f # Parent cb9f22c3553fc9696098af14b93a0a699166541d Be more tolerant with empty time intervals in discharge tables while comparing discharge tables. diff -r cb9f22c3553f -r 8138a90a674a flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/DischargeTablesOverview.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/DischargeTablesOverview.java Tue Oct 23 15:05:17 2012 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/DischargeTablesOverview.java Tue Oct 23 15:46:31 2012 +0200 @@ -151,6 +151,11 @@ protected String createSeriesTitle(CallMeta callMeta, DischargeTable dt) throws IllegalArgumentException { TimeInterval timeInterval = dt.getTimeInterval(); + + if (timeInterval == null) { + return Resources.format(callMeta, DEFAULT_CHART_SERIES_TITLE); + } + Date start = timeInterval.getStartTime(); Date end = timeInterval.getStopTime(); diff -r cb9f22c3553f -r 8138a90a674a flys-backend/src/main/java/de/intevation/flys/model/DischargeTable.java --- 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();