[Lada-commits] [PATCH] send all orte objects if limit param is '0'

Wald Commits scm-commit at wald.intevation.org
Thu Jan 28 12:16:22 CET 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1453979783 -3600
# Node ID 2ce24e2baf204dfb9170bc68ce9b03edf9c05b1a
# Parent  2f467a014619bf77b911fcfe84a31849ba5bad40
send all orte objects if limit param is '0'.

diff -r 2f467a014619 -r 2ce24e2baf20 src/main/java/de/intevation/lada/rest/stamm/OrtService.java
--- a/src/main/java/de/intevation/lada/rest/stamm/OrtService.java	Wed Jan 27 16:27:03 2016 +0100
+++ b/src/main/java/de/intevation/lada/rest/stamm/OrtService.java	Thu Jan 28 12:16:23 2016 +0100
@@ -114,7 +114,10 @@
                 int start = Integer.valueOf(params.getFirst("start"));
                 int limit = Integer.valueOf(params.getFirst("limit"));
                 int end = limit + start;
-                if (start + limit > orte.size()) {
+                if (limit == 0) {
+                    end = orte.size();
+                }
+                else if (start + limit > orte.size()) {
                     end = orte.size();
                 }
                 orte = orte.subList(start, end);


More information about the Lada-commits mailing list