Mercurial > lada > lada-server
changeset 853:2ce24e2baf20
send all orte objects if limit param is '0'.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 28 Jan 2016 12:16:23 +0100 |
parents | 2f467a014619 |
children | e797391714a0 36b1104c3c22 |
files | src/main/java/de/intevation/lada/rest/stamm/OrtService.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);