[Lada-commits] [PATCH] A period with end before start is meaningless

Wald Commits scm-commit at wald.intevation.org
Fri Sep 30 10:59:43 CEST 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1475225958 -7200
# Node ID 0a44ab47d3d5aa9e8f6dee4e7429e72d3094fab5
# Parent  daca5c62356fcda41d643881106cee799e172da4
A period with end before start is meaningless.

diff -r daca5c62356f -r 0a44ab47d3d5 src/main/java/de/intevation/lada/rest/ProbeService.java
--- a/src/main/java/de/intevation/lada/rest/ProbeService.java	Thu Sep 29 16:48:29 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/ProbeService.java	Fri Sep 30 10:59:18 2016 +0200
@@ -369,6 +369,9 @@
         String id = object.get("id").toString();
         long start = object.getJsonNumber("start").longValue();
         long end = object.getJsonNumber("end").longValue();
+        if (start > end) {
+            return new Response(false, 662, null);
+        }
         List<LProbe> proben = factory.create(
             id,
             start,


More information about the Lada-commits mailing list