You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2020/04/14 19:05:38 UTC

[Bug 64350] New: Sonar fix - "Iterator.next()" methods should throw "NoSuchElementException"

https://bz.apache.org/bugzilla/show_bug.cgi?id=64350

            Bug ID: 64350
           Summary: Sonar fix - "Iterator.next()" methods should throw
                    "NoSuchElementException"
           Product: POI
           Version: 4.1.x-dev
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
          Assignee: dev@poi.apache.org
          Reporter: kiwiwings@apache.org
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 64350] Sonar fix - "Iterator.next()" methods should throw "NoSuchElementException"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64350

Andreas Beeker <ki...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Andreas Beeker <ki...@apache.org> ---
Applied via r1876525

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org