jdk/src/share/classes/sun/security/pkcs/PKCS7.java
changeset 10336 0bb1999251f8
parent 9365 469cd39a25de
child 10788 680a3dbfcaba
--- a/jdk/src/share/classes/sun/security/pkcs/PKCS7.java	Mon Aug 15 12:56:01 2011 -0700
+++ b/jdk/src/share/classes/sun/security/pkcs/PKCS7.java	Mon Aug 15 11:48:20 2011 -0700
@@ -153,12 +153,13 @@
         contentType = contentInfo.contentType;
         DerValue content = contentInfo.getContent();
 
-        if (contentType.equals(ContentInfo.SIGNED_DATA_OID)) {
+        if (contentType.equals((Object)ContentInfo.SIGNED_DATA_OID)) {
             parseSignedData(content);
-        } else if (contentType.equals(ContentInfo.OLD_SIGNED_DATA_OID)) {
+        } else if (contentType.equals((Object)ContentInfo.OLD_SIGNED_DATA_OID)) {
             // This is for backwards compatibility with JDK 1.1.x
             parseOldSignedData(content);
-        } else if (contentType.equals(ContentInfo.NETSCAPE_CERT_SEQUENCE_OID)){
+        } else if (contentType.equals((Object)
+                       ContentInfo.NETSCAPE_CERT_SEQUENCE_OID)){
             parseNetscapeCertChain(content);
         } else {
             throw new ParsingException("content type " + contentType +
@@ -477,9 +478,7 @@
                         byte[] encoded = certificates[i].getEncoded();
                         implCerts[i] = new X509CertImpl(encoded);
                     } catch (CertificateException ce) {
-                        IOException ie = new IOException(ce.getMessage());
-                        ie.initCause(ce);
-                        throw ie;
+                        throw new IOException(ce);
                     }
                 }
             }
@@ -501,9 +500,7 @@
                         byte[] encoded = crl.getEncoded();
                         implCRLs.add(new X509CRLImpl(encoded));
                     } catch (CRLException ce) {
-                        IOException ie = new IOException(ce.getMessage());
-                        ie.initCause(ce);
-                        throw ie;
+                        throw new IOException(ce);
                     }
                 }
             }
@@ -562,7 +559,7 @@
                 intResult.addElement(signerInfo);
             }
         }
-        if (intResult.size() != 0) {
+        if (!intResult.isEmpty()) {
 
             SignerInfo[] result = new SignerInfo[intResult.size()];
             intResult.copyInto(result);