github-api icon indicating copy to clipboard operation
github-api copied to clipboard

PagedSearchIterable relies on cached result

Open bitwiseman opened this issue 5 years ago • 0 comments

The populate() method depends on adapt(). The Iterator created in adapt() loads a result, but never refreshes it: https://github.com/github-api/github-api/blob/bccae94c7a740fa7ba297fd6eb2a6782ed156a98/src/main/java/org/kohsuke/github/PagedSearchIterable.java#L91-L93

This means that the getTotalCount() can become out of sync from iterators or actual search results.

https://github.com/github-api/github-api/blob/bccae94c7a740fa7ba297fd6eb2a6782ed156a98/src/main/java/org/kohsuke/github/PagedSearchIterable.java#L48-L50

bitwiseman avatar Mar 17 '20 18:03 bitwiseman