diff --git a/org/mozilla/jss/netscape/security/pkcs/PKCS7.java b/org/mozilla/jss/netscape/security/pkcs/PKCS7.java index 826dbdae8..fd5a77653 100644 --- a/org/mozilla/jss/netscape/security/pkcs/PKCS7.java +++ b/org/mozilla/jss/netscape/security/pkcs/PKCS7.java @@ -344,11 +344,9 @@ public void encodeSignedData(DerOutputStream out, boolean sort) implCerts[i] = (X509CertImpl) certificates[i]; } } catch (ClassCastException e) { - IOException ioe = - new IOException("Certificates in PKCS7 " + - "must be of class " + - "org.mozilla.jss.netscape.security.X509CertImpl"); - ioe.fillInStackTrace(); + throw new IOException( + "Certificates in PKCS7 must be of class " + + "org.mozilla.jss.netscape.security.X509CertImpl: " + e.getMessage(), e); } // Add the certificate set (tagged with [0] IMPLICIT)