Currently there are few Iterators used which don't behave correctly in the case of an depleted Iterator.next() see also https://sonarcloud.io/organizations/apache/rules?open=java%3AS2272&rule_key=java%3AS2272 The reason for opening a bug report are the side-effects on low-level usercode using the POIFSStream or POIFSMiniStore and expecting an IndexOutOfBoundsException in such a case. Although one could argue, that this is an API-break, this only occurs, if .next() is called when .hasNext() == false, which itself is an erroneous handling. Therefore I regard it as fix within 4.x.
Applied via r1876525