Skip to content

Commit

Permalink
cavern: remove some cruft accidentally left in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pdowler committed Mar 5, 2024
1 parent 46f0400 commit 61b712c
Showing 1 changed file with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,28 +222,6 @@ public FileSystemNodePersistence() {
}
}

// for use with allocationParents.add(node) and allocationParents.contains(node)
private class AbsoluteNodeComparator implements Comparator<Node> {
@Override
public int compare(Node n1, Node n2) {
if (n1 == null && n2 == null) {
throw new RuntimeException("BUG: two null args in comparator");
}
// nulls last
if (n1 == null && n2 != null) {
return 1;
}
if (n1 != null && n2 == null) {
return -1;
}
int ret = 0;

return ret;

}

}

// support FileAction
public CavernConfig getConfig() {
return config;
Expand All @@ -270,6 +248,9 @@ public ContainerNode getRootNode() {

@Override
public boolean isAllocation(ContainerNode cn) {
if (cn.parent == null) {
return false; // root is never an allocation
}
ContainerNode p = cn.parent;
for (ContainerNode ap : allocationParents) {
if (NodeUtil.absoluteEquals(p.parent, ap)) {
Expand Down

0 comments on commit 61b712c

Please sign in to comment.