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

Class PDDocument should implement java.io.Closeable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.4, 1.8.5, 2.0.0
    • 1.8.5, 2.0.0
    • None
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              asolntsev Andrei Solntsev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified