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.
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.
GHRepository#getIssuetakes id as anint. Same withgetPullRequest.github-api/src/main/java/org/kohsuke/github/GHRepository.java
Line 358 in e14ec3b
github-api/src/main/java/org/kohsuke/github/GHRepository.java
Line 1509 in e14ec3b
GHIssueandGHPullRequestwhich extendGHObjectreturns alongfor anid.github-api/src/main/java/org/kohsuke/github/GHObject.java
Line 32 in e14ec3b
To call either, with the original object requires you to downcast.
It seems to me both should be updated to be a
longto make everything consistent and not require down casting.