diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/CollectionRestRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/CollectionRestRepository.java index f273d6434e..4beeb61adc 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/CollectionRestRepository.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/CollectionRestRepository.java @@ -177,7 +177,7 @@ public class CollectionRestRepository extends DSpaceObjectRestRepository collections = cs.findCollectionsWithSubmit(q, context, com, Math.toIntExact(pageable.getOffset()), - Math.toIntExact(pageable.getOffset() + pageable.getPageSize())); + Math.toIntExact(pageable.getPageSize())); int tot = cs.countCollectionsWithSubmit(q, context, com); return converter.toRestPage(collections, pageable, tot , utils.obtainProjection()); } catch (SQLException | SearchServiceException e) { @@ -192,7 +192,7 @@ public class CollectionRestRepository extends DSpaceObjectRestRepository collections = cs.findCollectionsWithSubmit(q, context, null, Math.toIntExact(pageable.getOffset()), - Math.toIntExact(pageable.getOffset() + pageable.getPageSize())); + Math.toIntExact(pageable.getPageSize())); int tot = cs.countCollectionsWithSubmit(q, context, null); return converter.toRestPage(collections, pageable, tot, utils.obtainProjection()); } catch (SQLException e) {