From c39999295f3345ba5ba6a2f29307eb58e4bc30bc Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Wed, 10 Dec 2014 08:26:31 +0100 Subject: Temp File deletion moved to final block --- .../gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pdf-as-pdfbox/src') diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java index a0d85219..45dfbcc5 100644 --- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java +++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java @@ -541,9 +541,6 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants { IOUtils.closeQuietly(readReadyFile); } System.gc(); - - helper.deleteFile(fisTmpFile); - } catch (IOException e) { logger.warn(MessageResolver.resolveMessage("error.pdf.sig.01"), e); throw new PdfAsException("error.pdf.sig.01", e); @@ -562,6 +559,10 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants { // Ignore } } + + if(fisTmpFile != null) { + helper.deleteFile(fisTmpFile); + } logger.debug("Signature done!"); } -- cgit v1.2.3