You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by mu...@apache.org on 2006/06/02 16:53:32 UTC

svn commit: r411173 - /xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Author: mullan
Date: Fri Jun  2 07:53:30 2006
New Revision: 411173

URL: http://svn.apache.org/viewvc?rev=411173&view=rev
Log:
Fix findbugs bugs:
Null pointer dereferences in Factory.newAgreementMethod and Factory.newCipherData.
Useless control flow in Factory.newAgreementMethod and Factory.newCipherData.

Modified:
    xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Modified: xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java?rev=411173&r1=411172&r2=411173&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java Fri Jun  2 07:53:30 2006
@@ -2107,7 +2107,7 @@
         AgreementMethod newAgreementMethod(Element element) throws
                 XMLEncryptionException {
             if (null == element) {
-                //complain
+                throw new NullPointerException("element is null");
             }
 
             String algorithm = element.getAttributeNS(null, 
@@ -2173,7 +2173,7 @@
         CipherData newCipherData(Element element) throws
                 XMLEncryptionException {
             if (null == element) {
-                // complain
+                throw new NullPointerException("element is null");
             }
 
             int type = 0;