summaryrefslogtreecommitdiff
path: root/java/openjdk6/files/icedtea/openjdk/7195301-no_instanceof_node.patch
diff options
context:
space:
mode:
Diffstat (limited to 'java/openjdk6/files/icedtea/openjdk/7195301-no_instanceof_node.patch')
-rw-r--r--java/openjdk6/files/icedtea/openjdk/7195301-no_instanceof_node.patch86
1 files changed, 0 insertions, 86 deletions
diff --git a/java/openjdk6/files/icedtea/openjdk/7195301-no_instanceof_node.patch b/java/openjdk6/files/icedtea/openjdk/7195301-no_instanceof_node.patch
deleted file mode 100644
index fe6d8acae545..000000000000
--- a/java/openjdk6/files/icedtea/openjdk/7195301-no_instanceof_node.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1371053674 -3600
-# Node ID 2ae6d8da293f30c94c9478a6634c7a480328c5c5
-# Parent 18416c18dc35344d89a3a997420a65c996e5e906
-7195301: XML Signature DOM implementation should not use instanceof to determine type of Node
-Reviewed-by: mullan
-
-diff --git a/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java b/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java
---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java
-+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java
-@@ -158,7 +158,7 @@
- }
- }
- for (Node el=config.getFirstChild();el!=null;el=el.getNextSibling()) {
-- if (!(el instanceof Element)) {
-+ if (el.getNodeType() != Node.ELEMENT_NODE) {
- continue;
- }
- String tag=el.getLocalName();
-diff --git a/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java b/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java
---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java
-+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java
-@@ -187,7 +187,7 @@
- this._excludeNode = excludeNode;
- try {
- NameSpaceSymbTable ns=new NameSpaceSymbTable();
-- if (rootNode instanceof Element) {
-+ if (rootNode != null && rootNode.getNodeType() == Node.ELEMENT_NODE) {
- //Fills the nssymbtable with the definitions of the parent of the root subnode
- getParentNameSpaces((Element)rootNode,ns);
- }
-@@ -306,7 +306,7 @@
- return;
- sibling=parentNode.getNextSibling();
- parentNode=parentNode.getParentNode();
-- if (!(parentNode instanceof Element)) {
-+ if (parentNode !=null && parentNode.getNodeType() != Node.ELEMENT_NODE) {
- parentNode=null;
- }
- }
-@@ -509,7 +509,7 @@
- return;
- sibling=parentNode.getNextSibling();
- parentNode=parentNode.getParentNode();
-- if (!(parentNode instanceof Element)) {
-+ if (parentNode != null && parentNode.getNodeType() != Node.ELEMENT_NODE) {
- parentNode=null;
- }
- }
-@@ -541,18 +541,14 @@
- final static void getParentNameSpaces(Element el,NameSpaceSymbTable ns) {
- List parents=new ArrayList();
- Node n1=el.getParentNode();
-- if (!(n1 instanceof Element)) {
-+ if (n1 == null || n1.getNodeType() != Node.ELEMENT_NODE) {
- return;
- }
- //Obtain all the parents of the elemnt
-- Element parent=(Element) el.getParentNode();
-- while (parent!=null) {
-- parents.add(parent);
-- Node n=parent.getParentNode();
-- if (!(n instanceof Element )) {
-- break;
-- }
-- parent=(Element)n;
-+ Node parent = n1;
-+ while (parent!=null && parent.getNodeType() == Node.ELEMENT_NODE) {
-+ parents.add((Element)parent);
-+ parent = parent.getParentNode();
- }
- //Visit them in reverse order.
- ListIterator it=parents.listIterator(parents.size());
-diff --git a/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java b/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java
---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java
-+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java
-@@ -1523,7 +1523,7 @@
- // The de-serialiser returns a fragment whose children we need to
- // take on.
-
-- if (sourceParent instanceof Document) {
-+ if (sourceParent != null && sourceParent.getNodeType() == Node.DOCUMENT_NODE) {
-
- // If this is a content decryption, this may have problems
-