@@ -446,9 +446,8 @@ public List<GHIssueComment> getComments() throws IOException {
446446 */
447447 public PagedIterable <GHIssueComment > listComments () throws IOException {
448448 return root .createRequest ()
449- .asPagedIterable (getIssuesApiRoute () + "/comments" ,
450- GHIssueComment [].class ,
451- item -> item .wrapUp (GHIssue .this ));
449+ .withUrlPath (getIssuesApiRoute () + "/comments" )
450+ .toIterable (GHIssueComment [].class , item -> item .wrapUp (this ));
452451 }
453452
454453 @ Preview
@@ -468,7 +467,8 @@ public GHReaction createReaction(ReactionContent content) throws IOException {
468467 public PagedIterable <GHReaction > listReactions () {
469468 return owner .root .createRequest ()
470469 .withPreview (SQUIRREL_GIRL )
471- .asPagedIterable (getApiRoute () + "/reactions" , GHReaction [].class , item -> item .wrap (owner .root ));
470+ .withUrlPath (getApiRoute () + "/reactions" )
471+ .toIterable (GHReaction [].class , item -> item .wrap (owner .root ));
472472 }
473473
474474 /**
@@ -716,8 +716,7 @@ protected static List<String> getLogins(Collection<GHUser> users) {
716716 */
717717 public PagedIterable <GHIssueEvent > listEvents () throws IOException {
718718 return root .createRequest ()
719- .asPagedIterable (owner .getApiTailUrl (String .format ("/issues/%s/events" , number )),
720- GHIssueEvent [].class ,
721- item -> item .wrapUp (GHIssue .this ));
719+ .withUrlPath (owner .getApiTailUrl (String .format ("/issues/%s/events" , number )))
720+ .toIterable (GHIssueEvent [].class , item -> item .wrapUp (this ));
722721 }
723722}
0 commit comments