mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 08:21:23 +00:00
return iterable
This commit is contained in:
@@ -5,9 +5,9 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents a check run.
|
||||
@@ -112,14 +112,14 @@ public class GHCheckRun extends GHObject {
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*/
|
||||
public Iterator<GHPullRequest> getPullRequests() throws IOException {
|
||||
public List<GHPullRequest> getPullRequests() throws IOException {
|
||||
if (pullRequests != null && pullRequests.length != 0) {
|
||||
for (GHPullRequest singlePull : pullRequests) {
|
||||
singlePull.refresh();
|
||||
}
|
||||
return Arrays.stream(pullRequests).iterator();
|
||||
return Arrays.asList(pullRequests);
|
||||
}
|
||||
return Stream.<GHPullRequest>empty().iterator();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user