Skip to content

Commit 5405fb0

Browse files
author
Joe
committed
return unmodifiable list
1 parent 72a1c24 commit 5405fb0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/kohsuke/github/GHCheckRun.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public List<GHPullRequest> getPullRequests() throws IOException {
117117
for (GHPullRequest singlePull : pullRequests) {
118118
singlePull.refresh();
119119
}
120-
return Arrays.asList(pullRequests);
120+
return Collections.unmodifiableList(Arrays.asList(pullRequests));
121121
}
122122
return Collections.emptyList();
123123
}

src/main/java/org/kohsuke/github/GHCheckSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public List<GHPullRequest> getPullRequests() throws IOException {
165165
for (GHPullRequest singlePull : pullRequests) {
166166
singlePull.refresh();
167167
}
168-
return Arrays.asList(pullRequests);
168+
return Collections.unmodifiableList(Arrays.asList(pullRequests));
169169
}
170170
return Collections.emptyList();
171171
}

0 commit comments

Comments
 (0)