Shouldn't this throw an java.util.NoSuchElementException instead?