You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2013/05/16 20:43:16 UTC
[jira] [Commented] (PDFBOX-1600) COSDocument and PDDocument declare
throws IOException when they don't
[ https://issues.apache.org/jira/browse/PDFBOX-1600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13659816#comment-13659816 ]
Maruan Sahyoun commented on PDFBOX-1600:
----------------------------------------
Hi,
from the source http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java?view=markup
129 public COSDocument(File scratchDir, boolean forceParsingValue) throws IOException
130 {
131 tmpFile = File.createTempFile("pdfbox-", ".tmp", scratchDir);
132 scratchFile = new RandomAccessFile(tmpFile, "rw");
133 forceParsing = forceParsingValue;
134 }
so I think it creates a scratch file under some conditions.
WDYT
BR
Maruan
> COSDocument and PDDocument declare throws IOException when they don't
> ---------------------------------------------------------------------
>
> Key: PDFBOX-1600
> URL: https://issues.apache.org/jira/browse/PDFBOX-1600
> Project: PDFBox
> Issue Type: Task
> Components: PDModel
> Affects Versions: 1.8.1
> Reporter: Patrick Tucker
> Priority: Trivial
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The doc for COSDocument() says it throws an IOException if there is an error creating the temp file. If you dig through the code a temp is never created, a value of null is assigned to tmpFile.
> Upon fixing the COSDocument() constructor, the constructor for PDDocument will also not need to declare an IOException as a possible throws.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira