Skip to content

Commit

Permalink
vault: fix possible NPE if child iterator used after close
Browse files Browse the repository at this point in the history
  • Loading branch information
pdowler committed May 9, 2024
1 parent a5993bd commit 72f6352
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vault/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# tags with and without build number so operators use the versioned
# tag but we always keep a timestamped tag in case a semantic tag gets
# replaced accidentally
VER=1.0.5
VER=1.0.6
TAGS="${VER} ${VER}-$(date --utc +"%Y%m%dT%H%M%S")"
unset VER
2 changes: 1 addition & 1 deletion vault/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
compile 'org.opencadc:cadc-gms:[1.0.5,)'
compile 'org.opencadc:cadc-rest:[1.3.16,)'
compile 'org.opencadc:cadc-vos:[2.0.6,)'
compile 'org.opencadc:cadc-vos-server:[2.0.14,)'
compile 'org.opencadc:cadc-vos-server:[2.0.15,)'
compile 'org.opencadc:cadc-vosi:[1.3.2,)'
compile 'org.opencadc:cadc-uws:[1.0,)'
compile 'org.opencadc:cadc-uws-server:[1.2.19,)'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,17 @@ private class ChildNodeWrapper implements ResourceIterator<Node> {

@Override
public boolean hasNext() {
return childIter.hasNext();
if (childIter != null) {
return childIter.hasNext();
}
return false;
}

@Override
public Node next() {
if (childIter == null) {
throw new NoSuchElementException("iterator closed");
}
Node ret = childIter.next();
ret.parent = parent;

Expand Down

0 comments on commit 72f6352

Please sign in to comment.