Yes, it's an optimization. The "deopt" is a null check, which is usually free. The opt is considerable - individual iterators are usually thrown away after exhaustion, but there are all kinds of composition scenarios where hasNext is repeatedly called on the leading iterators on the way to the elements behind them.