[PATCH 4 of 5] (issue1755) Fix check for valid date range
Wald Commits
scm-commit at wald.intevation.org
Fri Mar 27 17:31:23 CET 2015
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1427473594 -3600
# Node ID 97d60b0afe24c5876586c28a68910d9d0af88c63
# Parent 3c78fc83fc6d84202e69fee6d8ab60fd725bd1e3
(issue1755) Fix check for valid date range.
diff -r 3c78fc83fc6d -r 97d60b0afe24 artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityPeriodsSelect.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityPeriodsSelect.java Fri Mar 27 17:25:30 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityPeriodsSelect.java Fri Mar 27 17:26:34 2015 +0100
@@ -134,9 +134,9 @@
long max = minMax[1];
for (DateRange range: access.getDateRanges()) {
long a = range.getFrom().getTime();
- long b = range.getFrom().getTime();
- if ((a < min || a > max) &&
- ( b < min || b > max)) {
+ long b = range.getTo().getTime();
+ log.debug("min max a b " + min + " " + max + " " + a + " " + b);
+ if (b < min || a > max || a > b) {
DateFormat df = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy");
throw new IllegalArgumentException(Resources.getMsg(context.getMeta(),
I18N_NO_DATA_FOR_PERIOD,
More information about the Dive4Elements-commits
mailing list