You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andrei Solntsev (JIRA)" <ji...@apache.org> on 2014/04/22 23:38:14 UTC

[jira] [Created] (PDFBOX-2039) Class PDDocument should implement java.io.Closeable

Andrei Solntsev created PDFBOX-2039:
---------------------------------------

             Summary: Class PDDocument should implement java.io.Closeable
                 Key: PDFBOX-2039
                 URL: https://issues.apache.org/jira/browse/PDFBOX-2039
             Project: PDFBox
          Issue Type: Bug
            Reporter: Andrei Solntsev


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)