related to bug 25811: prevent NPE
authorAsier Lostalé <asier.lostale@openbravo.com>
Mon, 24 Feb 2014 16:01:09 +0100
changeset 22136 395b16591ed9
parent 22135 f8a24f45788a
child 22137 0156dbf78729
related to bug 25811: prevent NPE
modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java	Mon Feb 24 12:55:18 2014 +0100
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java	Mon Feb 24 16:01:09 2014 +0100
@@ -182,7 +182,7 @@
         bobs = bobFetchTransformation(bobs, parameters);
         // take start row from actual query service because it can be modified from the originally
         // requested one
-        int startRow = queryService.getFirstResult();
+        int startRow = queryService.getFirstResult() != null ? queryService.getFirstResult() : 0;
 
         if (preventCountOperation) {
           count = bobs.size() + startRow;