You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Peter_Lenahan@ibi.com (JIRA)" <ji...@apache.org> on 2010/04/30 02:18:57 UTC

[jira] Created: (PDFBOX-710) XMPSchema.java:392 and XMPSchema.java:570 Possible null pointer dereference of bagElement

XMPSchema.java:392 and XMPSchema.java:570 Possible null pointer dereference of bagElement
-----------------------------------------------------------------------------------------

                 Key: PDFBOX-710
                 URL: https://issues.apache.org/jira/browse/PDFBOX-710
             Project: PDFBox
          Issue Type: Bug
          Components: JempBox
    Affects Versions: 1.1.0
            Reporter: Peter_Lenahan@ibi.com


Findbugs Scan of the code reports  code paths which may result in a null pointer reference.

C:/workspace/ibi_apps/src/org/apache/jempbox/xmp/XMPSchema.java:570 Possible null pointer dereference of bagElement
C:/workspace/ibi_apps/src/org/apache/jempbox/xmp/XMPSchema.java:392 Possible null pointer dereference of bagElement

The solution is to test for null before attempting to use the objects.

A patch file is included

Peter


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-710) XMPSchema.java:392 and XMPSchema.java:570 Possible null pointer dereference of bagElement

Posted by "Peter_Lenahan@ibi.com (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter_Lenahan@ibi.com updated PDFBOX-710:
-----------------------------------------

    Attachment: XMPSchema-Findbugs-possible-null-pointer-reference.txt
                XMPSchema.java

This patch simply checks for null before referencing the objects.

I have no reproduction for the problem, just a bug that Findbugs reported, and it was easy to fix.

Thanks,
Peter

> XMPSchema.java:392 and XMPSchema.java:570 Possible null pointer dereference of bagElement
> -----------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-710
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-710
>             Project: PDFBox
>          Issue Type: Bug
>          Components: JempBox
>    Affects Versions: 1.1.0
>            Reporter: Peter_Lenahan@ibi.com
>         Attachments: XMPSchema-Findbugs-possible-null-pointer-reference.txt, XMPSchema.java
>
>
> Findbugs Scan of the code reports  code paths which may result in a null pointer reference.
> C:/workspace/ibi_apps/src/org/apache/jempbox/xmp/XMPSchema.java:570 Possible null pointer dereference of bagElement
> C:/workspace/ibi_apps/src/org/apache/jempbox/xmp/XMPSchema.java:392 Possible null pointer dereference of bagElement
> The solution is to test for null before attempting to use the objects.
> A patch file is included
> Peter

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.