An Infinite Loop

This code from XOM's Canonicalizer class was 100% covered. However code coverage did not show that this was an infinite loop if the loop executed more than twice:

ParentNode root = (ParentNode) node;
while (root.getParent() != null) root = node.getParent(); 

Previous | Next | Top | Cafe con Leche

Copyright 2005, 2006 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified November 9, 2005