summaryrefslogtreecommitdiffstats
path: root/base/ca/src/com/netscape/ca
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2013-03-08 09:29:02 -0500
committerAde Lee <alee@redhat.com>2013-03-08 21:26:30 -0500
commitddc391f574fff16f84cfa485c09ebc495f654340 (patch)
tree11400da443e222716cb68d22b74ba108347e2fed /base/ca/src/com/netscape/ca
parentb953c172bf274352c628ffef7d3ef0ef4c9ce59d (diff)
downloadpki-ddc391f574fff16f84cfa485c09ebc495f654340.tar.gz
pki-ddc391f574fff16f84cfa485c09ebc495f654340.tar.xz
pki-ddc391f574fff16f84cfa485c09ebc495f654340.zip
Plug resource leaks
Diffstat (limited to 'base/ca/src/com/netscape/ca')
-rw-r--r--base/ca/src/com/netscape/ca/CertificateAuthority.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/base/ca/src/com/netscape/ca/CertificateAuthority.java b/base/ca/src/com/netscape/ca/CertificateAuthority.java
index 50ef503b6..73ce6dfe4 100644
--- a/base/ca/src/com/netscape/ca/CertificateAuthority.java
+++ b/base/ca/src/com/netscape/ca/CertificateAuthority.java
@@ -960,8 +960,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
statsSub.startTiming("signing");
}
- try {
- DerOutputStream out = new DerOutputStream();
+ try (DerOutputStream out = new DerOutputStream()) {
DerOutputStream tmp = new DerOutputStream();
if (algname == null) {
@@ -1034,8 +1033,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
statsSub.startTiming("signing");
}
- try {
- DerOutputStream out = new DerOutputStream();
+ try (DerOutputStream out = new DerOutputStream()) {
DerOutputStream tmp = new DerOutputStream();
if (certInfo == null) {
@@ -1931,8 +1929,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
}
private BasicOCSPResponse sign(ResponseData rd) throws EBaseException {
- try {
- DerOutputStream out = new DerOutputStream();
+ try (DerOutputStream out = new DerOutputStream()) {
DerOutputStream tmp = new DerOutputStream();
String algname = mOCSPSigningUnit.getDefaultAlgorithm();