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 2014/04/23 08:14:14 UTC
[jira] [Comment Edited] (PDFBOX-2039) Class PDDocument should
implement java.io.Closeable
[ https://issues.apache.org/jira/browse/PDFBOX-2039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13977504#comment-13977504 ]
Tilman Hausherr edited comment on PDFBOX-2039 at 4/23/14 6:12 AM:
------------------------------------------------------------------
-The 1.8 version must support JDK5, so it is not possible.- The 2.0 version has COSDocument and PDDocument that are Closeable.
was (Author: tilman):
The 1.8 version must support JDK5, so it is not possible. The 2.0 version has COSDocument and PDDocument that are Closeable.
> Class PDDocument should implement java.io.Closeable
> ---------------------------------------------------
>
> Key: PDFBOX-2039
> URL: https://issues.apache.org/jira/browse/PDFBOX-2039
> Project: PDFBox
> Issue Type: Improvement
> Affects Versions: 1.8.4, 1.8.5, 2.0.0
> Reporter: Andrei Solntsev
> Priority: Minor
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> It would make it possible to use Java 7 try-with-resources feature:
> try (PDDocument doc = PDDocument.load(outputFile)) {
> // bla-bla
> // no need to call doc.close(); explicitly
> }
> P.S. Actually all org.apache.pdfbox.* classes with method close() could implement java.io.Closeable
--
This message was sent by Atlassian JIRA
(v6.2#6252)