Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vault: fix possible NPE if child iterator used after close #582

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading