Skip to content

Commit

Permalink
Fixed out of bounds exception when a volume limit is applied [#26]
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpierce committed Sep 14, 2024
1 parent 231f7f1 commit 6a2ce58
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public List<VolumeMetadata> execute() throws MetadataException {
response.getVolumes().size() == 1 ? "" : "s");

Integer totalRecords = maxRecords;
if (totalRecords == 0) totalRecords = response.getVolumes().size();
if (totalRecords == 0 || totalRecords >= response.getVolumes().size())
totalRecords = response.getVolumes().size();

response
.getVolumes()
Expand Down

0 comments on commit 6a2ce58

Please sign in to comment.