I dont understand why continue causes error here
public void clear() {
log.debug("Clearing hash");
// wow!
while( hash.size()>0 ) {
for(Map.Entry<Node,Node> entry : hash.entrySet()) {
clearingParents: {
while( entry.getKey().ups.size() > 0 ) {
for(Node node : entry.getKey().ups) {
log.debug("Clearing {}, hash size is {}", node, hash.size());
if( node.sizeUps() == 0 ) {
node.clear();
continue clearingParents;
}
else {
log.debug("was skipped since inserted");
}
}
break clearingParents;
}
}
}
}
I am using this scheme since node.clear() causes iterator to appear broken
you label an block instead of the while loop.
you can
breakout of alabeled blockbut notcontinuethelabeled blockit doesnt make sense to
continue a labeled blockas it aint a looplabel your loop like below
study about labeling loops here