Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/utils/InputValidator.java @ 1109:2b4d197a538c
Fixed the time range validation - introduced an epsilon of one second for valid time ranges (issue286).
gnv-artifacts/trunk@1240 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 29 Jun 2010 09:07:26 +0000 |
parents | 46cc1ab1ee15 |
children | f953c9a559d8 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/utils/InputValidator.java Tue Jun 29 08:47:46 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/utils/InputValidator.java Tue Jun 29 09:07:26 2010 +0000 @@ -233,7 +233,8 @@ log.debug("-> input data [sec]: " + tmpTime); } - if (tmpTime < tmpLow || tmpTime > tmpUp) { + // XXX There is a buffer of 1 second for the valid range of the time. + if (tmpTime < (tmpLow-1) || tmpTime > (tmpUp+1)) { log.warn( "Date [" + tmp.toString() + "] is out of range [" + lo.toString() + " to "+ up.toString() + "].");