File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
src/main/java/org/kohsuke/github Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 55import java .io .IOException ;
66import java .net .URL ;
77import java .util .Arrays ;
8+ import java .util .Collections ;
89import java .util .Date ;
9- import java .util .Iterator ;
10- import java .util .stream .Stream ;
10+ import java .util .List ;
1111
1212/**
1313 * Represents a check run.
@@ -112,14 +112,14 @@ public String getHeadSha() {
112112 * @throws IOException
113113 * the io exception
114114 */
115- public Iterator <GHPullRequest > getPullRequests () throws IOException {
115+ public List <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 .asList (pullRequests );
121121 }
122- return Stream .< GHPullRequest > empty (). iterator ();
122+ return Collections . emptyList ();
123123 }
124124
125125 /**
Original file line number Diff line number Diff line change 55import java .io .IOException ;
66import java .net .URL ;
77import java .util .Arrays ;
8+ import java .util .Collections ;
89import java .util .Date ;
910import java .util .Iterator ;
11+ import java .util .List ;
1012import java .util .stream .Stream ;
1113
1214/**
@@ -160,14 +162,14 @@ public GHApp getApp() {
160162 * @throws IOException
161163 * the io exception
162164 */
163- public Iterator <GHPullRequest > getPullRequests () throws IOException {
165+ public List <GHPullRequest > getPullRequests () throws IOException {
164166 if (pullRequests != null && pullRequests .length != 0 ) {
165167 for (GHPullRequest singlePull : pullRequests ) {
166168 singlePull .refresh ();
167169 }
168- return Arrays .stream (pullRequests ). iterator ( );
170+ return Arrays .asList (pullRequests );
169171 }
170- return Stream .< GHPullRequest > empty (). iterator ();
172+ return Collections . emptyList ();
171173 }
172174
173175 /**
You can’t perform that action at this time.
0 commit comments