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
When trying to get comments for pull requests with no comments NoSuchElementException is thrown.
I would except empty list instead.
java.util.NoSuchElementException
at org.kohsuke.github.Requester$1.next(Requester.java:212)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:42)
at org.kohsuke.github.PagedIterator.nextPage(PagedIterator.java:57)
at org.kohsuke.github.PagedIterable.asList(PagedIterable.java:20)
at org.kohsuke.github.GHIssue.getComments(GHIssue.java:184)
API response for /repos/janinko/test/issues/7/comments with no comments - there are no Link header and returns empty array:
I'm seeing this issue out in the real world. It's blocking me from being able to deploy the (otherwise excellent) Jenkins pull request builder in my environment.
When trying to get comments for pull requests with no comments
NoSuchElementException
is thrown.I would except empty list instead.
API response for
/repos/janinko/test/issues/7/comments
with no comments - there are noLink
header and returns empty array:So IMHO in
PagedIterable.asList()
i.hasNext()
returns true because it has next (but empty) array.The text was updated successfully, but these errors were encountered: