You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Kevin Jackson (JIRA)" <ji...@apache.org> on 2011/02/11 04:29:57 UTC
[jira] Created: (PDFBOX-960) Null Pointer Exception when Annotation
is missing the Subtype
Null Pointer Exception when Annotation is missing the Subtype
-------------------------------------------------------------
Key: PDFBOX-960
URL: https://issues.apache.org/jira/browse/PDFBOX-960
Project: PDFBox
Issue Type: Bug
Components: PDModel
Affects Versions: 1.4.0
Reporter: Kevin Jackson
Fix For: 1.5.0
If an annotation is missing the required Subtype then calling createAnnotation() will result in a NPE.
A better result is to return null and let the upper level code handle it.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (PDFBOX-960) Null Pointer Exception when Annotation
is missing the Subtype
Posted by "Kevin Jackson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Jackson updated PDFBOX-960:
---------------------------------
Attachment: (was: PDAnnotation.java.patch)
> Null Pointer Exception when Annotation is missing the Subtype
> -------------------------------------------------------------
>
> Key: PDFBOX-960
> URL: https://issues.apache.org/jira/browse/PDFBOX-960
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.4.0
> Reporter: Kevin Jackson
> Fix For: 1.5.0
>
>
> If an annotation is missing the required Subtype then calling createAnnotation() will result in a NPE.
> A better result is to return null and let the upper level code handle it.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (PDFBOX-960) Null Pointer Exception when Annotation
is missing the Subtype
Posted by "Kevin Jackson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Jackson updated PDFBOX-960:
---------------------------------
Attachment: PDAnnotation.java.patch
> Null Pointer Exception when Annotation is missing the Subtype
> -------------------------------------------------------------
>
> Key: PDFBOX-960
> URL: https://issues.apache.org/jira/browse/PDFBOX-960
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.4.0
> Reporter: Kevin Jackson
> Fix For: 1.5.0
>
>
> If an annotation is missing the required Subtype then calling createAnnotation() will result in a NPE.
> A better result is to return null and let the upper level code handle it.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (PDFBOX-960) Null Pointer Exception when Annotation
is missing the Subtype
Posted by "Kevin Jackson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Jackson updated PDFBOX-960:
---------------------------------
Attachment: PDAnnotation.java.patch
> Null Pointer Exception when Annotation is missing the Subtype
> -------------------------------------------------------------
>
> Key: PDFBOX-960
> URL: https://issues.apache.org/jira/browse/PDFBOX-960
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.4.0
> Reporter: Kevin Jackson
> Fix For: 1.5.0
>
> Attachments: PDAnnotation.java.patch
>
>
> If an annotation is missing the required Subtype then calling createAnnotation() will result in a NPE.
> A better result is to return null and let the upper level code handle it.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (PDFBOX-960) Null Pointer Exception when
Annotation is missing the Subtype
Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler resolved PDFBOX-960.
---------------------------------------
Resolution: Fixed
Assignee: Andreas Lehmkühler
I adapted Kevins proposal as it is always a good idea to compare constants to given values and not vice versa.
I added those changes in revision 1070099.
Thanks for the contribution!
> Null Pointer Exception when Annotation is missing the Subtype
> -------------------------------------------------------------
>
> Key: PDFBOX-960
> URL: https://issues.apache.org/jira/browse/PDFBOX-960
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.4.0
> Reporter: Kevin Jackson
> Assignee: Andreas Lehmkühler
> Fix For: 1.5.0
>
> Attachments: PDAnnotation.java.patch
>
>
> If an annotation is missing the required Subtype then calling createAnnotation() will result in a NPE.
> A better result is to return null and let the upper level code handle it.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira