Skip to content

Commit 1ca6535

Browse files
authored
Merge pull request hub4j#449 from martinvanzijl/issue_426_fix_nullptr_when_deleting_refs
Fix for issue hub4j#426. Fix null pointer when deleting refs.
2 parents 53612ad + c309c2c commit 1ca6535

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,9 @@ public PagedIterable<GHRef> listRefs() throws IOException {
813813
public PagedIterator<GHRef> _iterator(int pageSize) {
814814
return new PagedIterator<GHRef>(root.retrieve().asIterator(url, GHRef[].class, pageSize)) {
815815
protected void wrapUp(GHRef[] page) {
816-
// no-op
816+
for(GHRef p: page) {
817+
p.wrap(root);
818+
}
817819
}
818820
};
819821
}

0 commit comments

Comments
 (0)