From 3c8928ee8f2e88096b7399b8f8fb9ff0c58eeced Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 3 Oct 2012 20:05:06 +0000 Subject: Close some more streams git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1147 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- smcc/src/main/java/at/gv/egiz/smcc/SWCard.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'smcc/src/main/java/at/gv') diff --git a/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java b/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java index 7150c8b4..81b347c3 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java @@ -224,7 +224,13 @@ public class SWCard implements SignatureCard { } return sb.toString().trim().toCharArray(); } catch (IOException e) { - throw new SignatureCardException("Failed to read file '" + passwordFileName + "'."); + throw new SignatureCardException("Failed to read file '" + passwordFileName + "'.", e); + } finally { + try { + keyStorePasswordFile.close(); + } catch (IOException e) { + throw new SignatureCardException("Failed to close file '" + passwordFileName + "'.", e); + } } } -- cgit v1.2.3