pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PDFBOX-3847) code has bug
Date Tue, 04 Jul 2017 17:21:01 GMT

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

Tilman Hausherr resolved PDFBOX-3847.
-------------------------------------
    Resolution: Fixed

Setting to resolved as no further feedback came up. You can still open or comment, and you're
of course welcome to find bugs.

> 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


Mime
View raw message