Merge pull request #891 from danielluckas-rse/close-resources-after-usage

Close resources after usage
This commit is contained in:
Jochen Staerk
2025-07-22 16:14:01 +02:00
committed by GitHub
2 changed files with 3 additions and 6 deletions

View File

@@ -126,8 +126,7 @@ public class ZUGFeRDInvoiceImporter {
if (Arrays.equals(pad, pdfSignature)) { // we have a pdf
try {
PDDocument doc = Loader.loadPDF(IOUtils.toByteArray(pdfStream));
try(PDDocument doc = Loader.loadPDF(IOUtils.toByteArray(pdfStream))) {
// PDDocumentInformation info = doc.getDocumentInformation();
final PDDocumentNameDictionary names = new PDDocumentNameDictionary(doc.getDocumentCatalog());
//start