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/08/06 18:45:57 UTC
svn commit: r1511032 - in
/santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom:
ApacheCanonicalizer.java ApacheTransform.java
Author: mullan
Date: Tue Aug 6 16:45:57 2013
New Revision: 1511032
URL: http://svn.apache.org/r1511032
Log:
TransformService.init and marshalParams must throw NullPointerException when parent parameter is null
Modified:
santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java
santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java
Modified: santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java?rev=1511032&r1=1511031&r2=1511032&view=diff
==============================================================================
--- santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java (original)
+++ santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java Tue Aug 6 16:45:57 2013
@@ -71,7 +71,10 @@ public abstract class ApacheCanonicalize
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
- if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ if (parent == null) {
+ throw new NullPointerException();
+ }
+ if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
throw new ClassCastException("parent must be of type DOMStructure");
}
transformElem = (Element)
@@ -86,7 +89,10 @@ public abstract class ApacheCanonicalize
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
- if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ if (parent == null) {
+ throw new NullPointerException();
+ }
+ if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
throw new ClassCastException("parent must be of type DOMStructure");
}
transformElem = (Element)
Modified: santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java?rev=1511032&r1=1511031&r2=1511032&view=diff
==============================================================================
--- santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java (original)
+++ santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/ApacheTransform.java Tue Aug 6 16:45:57 2013
@@ -72,7 +72,10 @@ public abstract class ApacheTransform ex
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
- if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ if (parent == null) {
+ throw new NullPointerException();
+ }
+ if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
throw new ClassCastException("parent must be of type DOMStructure");
}
transformElem = (Element)
@@ -87,7 +90,10 @@ public abstract class ApacheTransform ex
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
- if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ if (parent == null) {
+ throw new NullPointerException();
+ }
+ if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
throw new ClassCastException("parent must be of type DOMStructure");
}
transformElem = (Element)