Skip to content

Commit

Permalink
Merge pull request #449 from martinvanzijl/issue_426_fix_nullptr_when…
Browse files Browse the repository at this point in the history
…_deleting_refs

Fix for issue #426. Fix null pointer when deleting refs.
  • Loading branch information
kohsuke committed Aug 30, 2018
2 parents 53612ad + c309c2c commit 1ca6535
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,9 @@ public PagedIterable<GHRef> listRefs() throws IOException {
public PagedIterator<GHRef> _iterator(int pageSize) {
return new PagedIterator<GHRef>(root.retrieve().asIterator(url, GHRef[].class, pageSize)) {
protected void wrapUp(GHRef[] page) {
// no-op
for(GHRef p: page) {
p.wrap(root);
}
}
};
}
Expand Down

0 comments on commit 1ca6535

Please sign in to comment.