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

PDAnnotationMarkup.getInReplyTo throws exception when no element

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • PDModel
    • None

    Description

      From David L. from the user the mailing list:

      I'm trying to read annotations from PDFs and am having trouble matching up
      replies with the annotations they're in reply to.

      PDPage.getAnnotations() returns a list of PDAnnotation. When I have
      a PDAnnotationMarkup, I try to call getInReplyTo to get the previous
      annotation in the thread. But I have two problems:

      1) getInReplyTo() crashes if the annotation isn't a reply. It'd be nice if
      it just returned null. I can work around this by getting the COSDictionary
      and checking for an IRT entry first.

      (... other problem already solved...)

      it is an IOException, this isn't as bad as a nullpointerexception. But it is kindof weird indeed, usually we just return null when something doesn't exist.

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: