Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4687

"Iterator.next()" methods should throw "NoSuchElementException"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.17
    • Fix Version/s: 2.0.18, 3.0.0 PDFBox
    • Component/s: PDModel
    • Labels:
      None

      Description

      Sonarcloud found that implementations of next() in PDFPageTree and PDOutlineItemIterator don't check that there exists a next element before accessing it:

      https://sonarcloud.io/organizations/apache/issues?languages=java&open=AW5JmA2vaYfGX6JOkPBy&resolved=false&rules=squid%3AS2272&types=BUG

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              HarisAdzemovic Haris Adzemovic
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: