diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java b/src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java index 3b83bb1..a222438 100644 --- a/src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java +++ b/src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java @@ -110,12 +110,12 @@ public class MultiCriteriaRequestBuilder { String limitString = limits.get(0); int offset = Integer.parseInt(offsetString); int limit = Integer.parseInt(limitString); - final Pageable pageableRequest = new PageRequest(offset, limit); + final Pageable pageableRequest = PageRequest.of(offset, limit); query.with(pageableRequest); } else if (!CollectionUtils.isEmpty(limits)) { String limitString = limits.get(0); int limit = Integer.parseInt(limitString); - final Pageable pageableRequest = new PageRequest(0, limit); + final Pageable pageableRequest = PageRequest.of(0, limit); query.with(pageableRequest); } } |