You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
NPE sporadically gets thrown by PageIterator (line 74) when PageIterator.hasNext() is invoked.
To Reproduce
Steps to reproduce the behavior:
I was able to reproduce behavior in this simple jUnit Test:
PageIterator<String> pagedIterator = new PagedIterator<>(((List<String[]>) new ArrayList<
String>[]()).iterator();
Assertions.assertFalse(pagedIterator.hasNext());
It seems like in this corner case currentPage does not get initialized and NPE gets thrown when calling currentPage.length on line 75.
Expected behavior
NPE should not be thrown and hasNext() should return false.
Desktop (please complete the following information):
Describe the bug
NPE sporadically gets thrown by PageIterator (line 74) when PageIterator.hasNext() is invoked.
To Reproduce
Steps to reproduce the behavior:
I was able to reproduce behavior in this simple jUnit Test:
It seems like in this corner case currentPage does not get initialized and NPE gets thrown when calling currentPage.length on line 75.
Expected behavior
NPE should not be thrown and hasNext() should return false.
Desktop (please complete the following information):
Additional context
Proposed fix:
The text was updated successfully, but these errors were encountered: