Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation6.java @ 2250:40608c82e9cb
Bugfix: create a report facet for historical discharge curves even if no data has been computed.
flys-artifacts/trunk@3899 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 03 Feb 2012 13:46:03 +0000 |
parents | 7335c526befd |
children | abb390101595 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation6.java Fri Feb 03 13:42:48 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation6.java Fri Feb 03 13:46:03 2012 +0000 @@ -53,6 +53,8 @@ WQTimerange[] wqt = prepareCalculationData(dts); + logger.debug("Number of calculation results: " + wqt.length); + return new CalculationResult(wqt, this); } @@ -131,6 +133,12 @@ Date start = ti.getStartTime(); Date end = ti.getStopTime(); + if (end == null) { + logger.warn("TimeInterval has no stop time set!"); + + end = new Date(); + } + Timerange t = new Timerange(ti.getStartTime(),ti.getStopTime()); double w; double q;