Tilman Hausherr created PDFBOX-3249:
---------------------------------------
Summary: PDAnnotationMarkup.getInReplyTo throws exception when no
element
Key: PDFBOX-3249
URL: https://issues.apache.org/jira/browse/PDFBOX-3249
Project: PDFBox
Issue Type: Bug
Components: PDModel
Affects Versions: 2.0.0
Reporter: Tilman Hausherr
Assignee: Tilman Hausherr
Fix For: 2.0.0
>From David L. from the user the mailing list:
{quote}
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...)
{quote}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]