Skip to content

Commit

Permalink
#25666 limit of the sublist should be limit+offset
Browse files Browse the repository at this point in the history
  • Loading branch information
erickgonzalez committed Aug 1, 2023
1 parent 0956cf6 commit 4c335bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ public static List<Contentlet> getPullResults(final Relationship relationship,
final List<Contentlet> filteredList = relatedContent.stream().filter(c->results.contains(c.getIdentifier()))
.collect(Collectors.toList());

return filteredList.subList(offset>=0?offset:0, (limit > 0 && limit <= filteredList.size())? limit: filteredList.size());
return filteredList.subList(offset>=0?offset:0, (limit > 0 && offset+limit <= filteredList.size() )? offset+limit: filteredList.size());
}

//pulling parents
Expand Down

0 comments on commit 4c335bc

Please sign in to comment.