diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-12-10 08:26:31 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-12-10 08:26:31 +0100 |
commit | c39999295f3345ba5ba6a2f29307eb58e4bc30bc (patch) | |
tree | bf6f1dcb295a908c4b5589a584a93ebb40b9815b /pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib | |
parent | 843020504a70df4e13d51fdcc4f1986b5656b2f2 (diff) | |
download | pdf-as-4-c39999295f3345ba5ba6a2f29307eb58e4bc30bc.tar.gz pdf-as-4-c39999295f3345ba5ba6a2f29307eb58e4bc30bc.tar.bz2 pdf-as-4-c39999295f3345ba5ba6a2f29307eb58e4bc30bc.zip |
Temp File deletion moved to final block
Diffstat (limited to 'pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib')
-rw-r--r-- | pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java | 7 |
1 files changed, 4 insertions, 3 deletions
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!"); } |