Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recordlist is empty, when splitting it with a larger rdp size than there are elements #17

Open
N520 opened this issue May 13, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@N520
Copy link
Collaborator

N520 commented May 13, 2022

When using the splitPartialRecordList method with a larger record size than there are elements, an empty recordlist is returned. I expected a Recordlist with the max nr of elements possible.

Following code has been copied from RecordList.java:45ff. a new (and empty) recordlist is returned when the nrOfRecords is larger than the size.

 public RecordList splitPartialRecordList(int offset, int noRecs) {
    if (offset < 0 || noRecs < 0 || (offset + noRecs) > size())
      return new RecordList();
    int end = noRecs > size() ? size() : (noRecs + offset);
    return new RecordList(records.subList(offset, end));
  }
@N520 N520 added the bug Something isn't working label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant