You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/06/30 18:23:00 UTC

[jira] [Assigned] (PDFBOX-3847) code has bug

     [ https://issues.apache.org/jira/browse/PDFBOX-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr reassigned PDFBOX-3847:
---------------------------------------

    Assignee: Tilman Hausherr

> code has bug
> ------------
>
>                 Key: PDFBOX-3847
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3847
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>            Reporter: xl19870217
>            Assignee: Tilman Hausherr
>             Fix For: 2.0.7, 3.0.0
>
>
> in {color:red} org.apache.pdfbox.rendering.PageDrawer.java{color}
> // return border info. BorderStyle must be provided as parameter because
>     // method is not available in the base class
>     private AnnotationBorder getAnnotationBorder(PDAnnotation annotation, 
>             PDBorderStyleDictionary borderStyle)
>     {
>         AnnotationBorder ab = new AnnotationBorder();
>         
>         COSArray border = annotation.getBorder();
>         if (borderStyle == null)
>         {
>           {color:red}  *// this code may throw NullPointerException*{color}
>             if (border.get(2) instanceof COSNumber)
>             {
>                 ab.width = ((COSNumber) border.getObject(2)).floatValue();
>             }
>             if (border.size() > 3)
>             {
>                 COSBase base3 = border.getObject(3);
>                 if (base3 instanceof COSArray)
>                 {
>                     ab.dashArray = ((COSArray) base3).toFloatArray();
>                 }
>             }
>         }
> i can not find the pdf file that has this promble.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org