-
Notifications
You must be signed in to change notification settings - Fork 775
Closed
Labels
Description
GHRepository#getIssue takes id as an int. Same with getPullRequest.
| public GHIssue getIssue(int id) throws IOException { |
| public GHPullRequest getPullRequest(int i) throws IOException { |
GHIssue and GHPullRequest which extend GHObject returns a long for an id.
| private long id; |
To call either, with the original object requires you to downcast.
if (issue) {
final GHIssue issue = repository.getIssue((int) item.getId());
} else {
final GHPullRequest pullRequest = repository.getPullRequest((int) item.getId());
}
It seems to me both should be updated to be a long to make everything consistent and not require down casting.
Reactions are currently unavailable