From ca401c4f9e30ab59cb12fc4098aec21b660f686f Mon Sep 17 00:00:00 2001 From: Abhishek Koneru Date: Thu, 19 Jul 2012 12:46:10 -0400 Subject: Patch 25 - Misc Fixes --- base/util/src/netscape/security/pkcs/PKCS8Key.java | 9 ++------- .../util/src/netscape/security/x509/CRLDistributionPoint.java | 11 ++--------- 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'base/util') diff --git a/base/util/src/netscape/security/pkcs/PKCS8Key.java b/base/util/src/netscape/security/pkcs/PKCS8Key.java index db1d6b275..8806cd3fb 100644 --- a/base/util/src/netscape/security/pkcs/PKCS8Key.java +++ b/base/util/src/netscape/security/pkcs/PKCS8Key.java @@ -331,9 +331,7 @@ public class PKCS8Key implements PrivateKey { * Serialization write ... PKCS#8 keys serialize as * themselves, and they're parsed when they get read back. */ - private synchronized void - writeObject(java.io.ObjectOutputStream stream) - throws IOException { + private void writeObject(java.io.ObjectOutputStream stream) throws IOException { stream.write(getEncoded()); } @@ -341,12 +339,9 @@ public class PKCS8Key implements PrivateKey { * Serialization read ... PKCS#8 keys serialize as * themselves, and they're parsed when they get read back. */ - private synchronized void readObject(ObjectInputStream stream) - throws IOException { - + private void readObject(ObjectInputStream stream) throws IOException { try { decode(stream); - } catch (InvalidKeyException e) { e.printStackTrace(); throw new IOException("deserialized key is invalid: " + diff --git a/base/util/src/netscape/security/x509/CRLDistributionPoint.java b/base/util/src/netscape/security/x509/CRLDistributionPoint.java index 637ee57fe..7c591aee5 100644 --- a/base/util/src/netscape/security/x509/CRLDistributionPoint.java +++ b/base/util/src/netscape/security/x509/CRLDistributionPoint.java @@ -251,7 +251,7 @@ public class CRLDistributionPoint implements ASN1Value { return templateInstance; } - public static void main(String args[]) throws Exception { + public static void main(String args[]) throws GeneralNamesException, IOException, InvalidBERException { ByteArrayOutputStream bos = null; FileOutputStream fos = null; try { @@ -337,9 +337,6 @@ public class CRLDistributionPoint implements ASN1Value { } System.out.println("Done"); - } catch (Exception e) { - e.printStackTrace(); - throw e; } finally { if (bos != null) { bos.close(); @@ -348,11 +345,7 @@ public class CRLDistributionPoint implements ASN1Value { fos.close(); } if (fos != null) { - try { - fos.close(); - } catch (IOException e) { - e.printStackTrace(); - } + fos.close(); } } } -- cgit