You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Gary L Peskin <ga...@firstech.com> on 2000/08/03 20:28:40 UTC
Fix to [BUGFIX] DTMProxy.java !!
As one of my customers says, "Gary, I know you can fix it because you've
fixed it twice already".
Sorry, but my earlier message, shown below, goes too far. This
accomplishes the desired result and still allows for a
ClassCastException in the proper place:
Index: DTMProxy.java
===================================================================
RCS file:
/home/cvspublic/xml-xalan/src/org/apache/xalan/xpath/dtm/DTMProxy.java,v
retrieving revision 1.12
diff -r1.12 DTMProxy.java
137,138c137
< DTMProxy dtmp = (DTMProxy)node;
< return (dtmp.node == this.node);
---
> return equals((Node) node);
Gary
-------- Original Message --------
In an earlier email, I suggested a repair for a problem with the
equals(Node node) method of DTMProxy.java. Unfortunately, I overlooked
the equals(Object node) method which suffers from the same problem.
This fix will repair that oversight in such a way that only one set of
code is used from now on so this shouldn't happen again. :)
This change also needs to be propagated to XalanJ 2.
Index: DTMProxy.java
===================================================================
RCS file:
/home/cvspublic/xml-xalan/src/org/apache/xalan/xpath/dtm/DTMProxy.java,v
retrieving revision 1.12
diff -r1.12 DTMProxy.java
135,143c135
< try
< {
< DTMProxy dtmp = (DTMProxy)node;
< return (dtmp.node == this.node);
< }
< catch(ClassCastException cce)
< {
< return false;
< }
---
> return equals((Node) node);
Gary