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 2013/06/26 21:39:52 UTC
svn commit: r1497056 -
/santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
Author: mullan
Date: Wed Jun 26 19:39:52 2013
New Revision: 1497056
URL: http://svn.apache.org/r1497056
Log:
unmarshalKeyInfo should throw NPE when xmlStructure is null as defined by the KeyInfoFactory API.
Modified:
santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java?rev=1497056&r1=1497055&r2=1497056&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java Wed Jun 26 19:39:52 2013
@@ -139,7 +139,10 @@ public final class DOMKeyInfoFactory ext
@Override
public KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure)
throws MarshalException {
- if (xmlStructure == null || !(xmlStructure instanceof javax.xml.crypto.dom.DOMStructure)) {
+ if (xmlStructure == null) {
+ throw new NullPointerException("xmlStructure cannot be null");
+ }
+ if (!(xmlStructure instanceof javax.xml.crypto.dom.DOMStructure)) {
throw new ClassCastException("xmlStructure must be of type DOMStructure");
}
Node node =