You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by zo...@apache.org on 2004/11/19 16:51:27 UTC

cvs commit: xml-xalan/java/src/org/apache/xpath/objects XStringForFSB.java

zongaro     2004/11/19 07:51:27

  Modified:    java/src/org/apache/xpath/objects XStringForFSB.java
  Log:
  Patch for Jira bug 1955.  The equals(Object) method contains a list of
  instanceof checks, and then casts the Object argument to the tested type in
  order to dispatch to a more specific equals method.  In the case where the
  Object argument was an XMLString, the code was actually casting "this" to
  XMLString - thus testing this.equals(this), which will always be true.
  
  Reviewd by Joanne Tong (joannet () ca ! ibm ! com).
  
  Revision  Changes    Path
  1.23      +2 -2      xml-xalan/java/src/org/apache/xpath/objects/XStringForFSB.java
  
  Index: XStringForFSB.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XStringForFSB.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- XStringForFSB.java	21 Oct 2004 15:29:10 -0000	1.22
  +++ XStringForFSB.java	19 Nov 2004 15:51:27 -0000	1.23
  @@ -432,7 +432,7 @@
       else if (obj2 instanceof XNodeSet)
         return obj2.equals(this);
       else if (obj2 instanceof XStringForFSB)
  -      return equals((XMLString) this);
  +      return equals((XMLString) obj2);
       else
         return equals(obj2.toString());
     }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org