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

Class PDDocument should implement java.io.Closeable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.4, 1.8.5, 2.0.0
    • Fix Version/s: 1.8.5, 2.0.0
    • Component/s: None
    • Labels:
      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

              • Assignee:
                tilman Tilman Hausherr
                Reporter:
                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