[
https://issues.apache.org/jira/browse/PDFBOX-2569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14246891#comment-14246891
]
ASF subversion and git services commented on PDFBOX-2569:
---------------------------------------------------------
Commit 1645708 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1645708 ]
PDFBOX-2569: add test for numbers that start with "+"
> 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: 1.8.8, 2.0.0
>
> 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)