File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/main/java/org/kohsuke/github Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -112,12 +112,12 @@ public String getHeadSha() {
112112 * @throws IOException
113113 * the io exception
114114 */
115- public Iterator <GHPullRequest > getPullRequests () throws IOException {
115+ public Iterator <GHPullRequest > getPullRequests () throws IOException {
116116 if (pullRequests != null && pullRequests .length != 0 ) {
117117 for (GHPullRequest singlePull : pullRequests ) {
118118 singlePull .refresh ();
119119 }
120- return Arrays .stream (pullRequests ).iterator ();
120+ return Arrays .stream (pullRequests ).iterator ();
121121 }
122122 return Stream .<GHPullRequest >empty ().iterator ();
123123 }
Original file line number Diff line number Diff line change 44
55import java .io .IOException ;
66import java .net .URL ;
7+ import java .util .Arrays ;
78import java .util .Date ;
9+ import java .util .Iterator ;
10+ import java .util .stream .Stream ;
811
912/**
1013 * Represents a check suite.
@@ -154,14 +157,17 @@ public GHApp getApp() {
154157 * Gets the pull requests participated in this check suite.
155158 *
156159 * @return Pull requests
160+ * @throws IOException
161+ * the io exception
157162 */
158- GHPullRequest [] getPullRequests () throws IOException {
163+ public Iterator < GHPullRequest > getPullRequests () throws IOException {
159164 if (pullRequests != null && pullRequests .length != 0 ) {
160165 for (GHPullRequest singlePull : pullRequests ) {
161166 singlePull .refresh ();
162167 }
168+ return Arrays .stream (pullRequests ).iterator ();
163169 }
164- return pullRequests ;
170+ return Stream .< GHPullRequest > empty (). iterator () ;
165171 }
166172
167173 /**
You can’t perform that action at this time.
0 commit comments