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

Tilman Hausherr resolved PDFBOX-2569.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0

fixed, thanks for your submission!

> COSNumber fails to parse numbers like "+018" in JRE <= 1.6
> ----------------------------------------------------------
>
>                 Key: PDFBOX-2569
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2569
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 1.8.8, 2.0.0
>         Environment: JRE 1.6 and below.
>            Reporter: Arthur Blake
>            Assignee: Tilman Hausherr
>            Priority: Minor
>              Labels: patch
>             Fix For: 2.0.0, 1.8.8
>
>         Attachments: 1.8.8-patch.diff, trunk-patch.diff
>
>
> Occasionally I encounter PDFs that have COSNumber's encoded with a preceding 
> plus sign, like "+018", "+1" etc. This is a valid number representation, 
> according to PDF 32000-1:2008 section 7.3.3.
> COSNumber fails to parse these on JDK 1.6 and below. JDK 1.7 and above does 
> not have the problem because Long.parseLong parses these correctly (in JDK 
> 1.6 and below the plus sign would causes a NumberFormatException.)
> I patched COSNumber with a simple fix on 1.8.8 and and verified that the fix 
> worked against the affected PDFs. The bug exists in later versions of PDFBox, 
> including the trunk. I will attach SVN patches for 1.8.8 and the trunk.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to