Skip to content

Commit 1156689

Browse files
committed
Restored backward compatibility
The signature of the method can change for the future, but it still has to return Label instances for older binaries
1 parent 9aaf69c commit 1156689

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public class GHIssue extends GHObject {
5252
protected String closed_at;
5353
protected int comments;
5454
protected String body;
55-
protected List<GHLabel> labels;
55+
// for backward compatibility with < 1.63, this collection needs to hold instances of Label, not GHLabel
56+
protected List<Label> labels;
5657
protected GHUser user;
5758
protected String title, html_url;
5859
protected GHIssue.PullRequest pull_request;
@@ -126,7 +127,7 @@ public Collection<GHLabel> getLabels() throws IOException {
126127
if(labels == null){
127128
return Collections.emptyList();
128129
}
129-
return Collections.unmodifiableList(labels);
130+
return Collections.<GHLabel>unmodifiableList(labels);
130131
}
131132

132133
public Date getClosedAt() {

0 commit comments

Comments
 (0)