Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1591

Resources should implement java.io.closeable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.0.0
    • PDModel
    • None

    Description

      All resources shoud implement the java.io.closable interface (http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html) which is available since Java 1.5.

      I found this when looking at org.apache.pdfbox.pdmodel.PDDocument the close method already has the same signature it should have. Just the interface is missing.

      Once the interface is implemented you can use the new try-with-resource added to Java 1.7.

      Attachments

        Issue Links

          Activity

            People

              tchojecki Thomas Chojecki
              wienczny Stephan Wienczny
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: