pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1748961 - /pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/ShowSignature.java
Date Sat, 18 Jun 2016 11:01:17 GMT
Author: tilman
Date: Sat Jun 18 11:01:17 2016
New Revision: 1748961

URL: http://svn.apache.org/viewvc?rev=1748961&view=rev
Log:
PDFBOX-3017: SonarQube fix

Modified:
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/ShowSignature.java

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/ShowSignature.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/ShowSignature.java?rev=1748961&r1=1748960&r2=1748961&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/ShowSignature.java
(original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/ShowSignature.java
Sat Jun 18 11:01:17 2016
@@ -105,8 +105,15 @@ public final class ShowSignature
 
                     // download the signed content
                     FileInputStream fis = new FileInputStream(infile);
-                    byte[] buf = sig.getSignedContent(fis);
-                    fis.close();
+                    byte[] buf = null;
+                    try
+                    {
+                        buf = sig.getSignedContent(fis);
+                    }
+                    finally
+                    {
+                        fis.close();
+                    }
 
                     System.out.println("Signature found");
                     System.out.println("Name:     " + sig.getName());



Mime
View raw message