Skip to content

Commit

Permalink
we need to maintain the binary compatibility, so I reverted getCommen…
Browse files Browse the repository at this point in the history
…ts and added listComments that exposes PagedIterable.

inspired by 8f95c4f
  • Loading branch information
janinko committed Aug 28, 2012
1 parent cc3793c commit 587278f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/org/kohsuke/github/GHIssue.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,17 @@ public void setLabels(String... labels) throws IOException {

/**
* Obtains all the comments associated with this issue.
*
* @see #listComments()
*/
public PagedIterable<GHIssueComment> getComments() throws IOException {
public List<GHIssueComment> getComments() throws IOException {
return listComments().asList();
}

/**
* Obtains all the comments associated with this issue.
*/
public PagedIterable<GHIssueComment> listComments() throws IOException {
return new PagedIterable<GHIssueComment>() {
public PagedIterator<GHIssueComment> iterator() {
return new PagedIterator<GHIssueComment>(root.retrievePaged(getApiRoute() + "/comments",GHIssueComment[].class,false)) {
Expand Down

0 comments on commit 587278f

Please sign in to comment.