Restored backward compatibility

The signature of the method can change for the future, but it still has
to return Label instances for older binaries
This commit is contained in:
Kohsuke Kawaguchi
2015-03-02 08:31:54 -08:00
parent 9aaf69cc9a
commit 11566891dc

View File

@@ -52,7 +52,8 @@ public class GHIssue extends GHObject {
protected String closed_at;
protected int comments;
protected String body;
protected List<GHLabel> labels;
// for backward compatibility with < 1.63, this collection needs to hold instances of Label, not GHLabel
protected List<Label> labels;
protected GHUser user;
protected String title, html_url;
protected GHIssue.PullRequest pull_request;
@@ -126,7 +127,7 @@ public class GHIssue extends GHObject {
if(labels == null){
return Collections.emptyList();
}
return Collections.unmodifiableList(labels);
return Collections.<GHLabel>unmodifiableList(labels);
}
public Date getClosedAt() {