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 5
5
import java .io .IOException ;
6
6
import java .net .URL ;
7
7
import java .util .Arrays ;
8
+ import java .util .Collections ;
8
9
import java .util .Date ;
9
- import java .util .Iterator ;
10
- import java .util .stream .Stream ;
10
+ import java .util .List ;
11
11
12
12
/**
13
13
* Represents a check run.
@@ -112,14 +112,14 @@ public String getHeadSha() {
112
112
* @throws IOException
113
113
* the io exception
114
114
*/
115
- public Iterator <GHPullRequest > getPullRequests () throws IOException {
115
+ public List <GHPullRequest > getPullRequests () throws IOException {
116
116
if (pullRequests != null && pullRequests .length != 0 ) {
117
117
for (GHPullRequest singlePull : pullRequests ) {
118
118
singlePull .refresh ();
119
119
}
120
- return Arrays .stream (pullRequests ). iterator ( );
120
+ return Arrays .asList (pullRequests );
121
121
}
122
- return Stream .< GHPullRequest > empty (). iterator ();
122
+ return Collections . emptyList ();
123
123
}
124
124
125
125
/**
Original file line number Diff line number Diff line change 5
5
import java .io .IOException ;
6
6
import java .net .URL ;
7
7
import java .util .Arrays ;
8
+ import java .util .Collections ;
8
9
import java .util .Date ;
9
10
import java .util .Iterator ;
11
+ import java .util .List ;
10
12
import java .util .stream .Stream ;
11
13
12
14
/**
@@ -160,14 +162,14 @@ public GHApp getApp() {
160
162
* @throws IOException
161
163
* the io exception
162
164
*/
163
- public Iterator <GHPullRequest > getPullRequests () throws IOException {
165
+ public List <GHPullRequest > getPullRequests () throws IOException {
164
166
if (pullRequests != null && pullRequests .length != 0 ) {
165
167
for (GHPullRequest singlePull : pullRequests ) {
166
168
singlePull .refresh ();
167
169
}
168
- return Arrays .stream (pullRequests ). iterator ( );
170
+ return Arrays .asList (pullRequests );
169
171
}
170
- return Stream .< GHPullRequest > empty (). iterator ();
172
+ return Collections . emptyList ();
171
173
}
172
174
173
175
/**
You can’t perform that action at this time.
0 commit comments