dmitri      02/04/10 19:59:42

  Modified:    jxpath/src/java/org/apache/commons/jxpath/ri/pointers
                        DOMNodePointer.java
  Log:
  Cleaner string comparison
  
  Revision  Changes    Path
  1.5       +10 -5     
jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/pointers/DOMNodePointer.java
  
  Index: DOMNodePointer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/pointers/DOMNodePointer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DOMNodePointer.java       10 Apr 2002 03:40:20 -0000      1.4
  +++ DOMNodePointer.java       11 Apr 2002 02:59:42 -0000      1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/pointers/DOMNodePointer.java,v
 1.4 2002/04/10 03:40:20 dmitri Exp $
  - * $Revision: 1.4 $
  - * $Date: 2002/04/10 03:40:20 $
  + * $Header: 
/home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/pointers/DOMNodePointer.java,v
 1.5 2002/04/11 02:59:42 dmitri Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/04/11 02:59:42 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -74,7 +74,7 @@
    * A Pointer that points to a DOM node.
    *
    * @author Dmitri Plotnikov
  - * @version $Revision: 1.4 $ $Date: 2002/04/10 03:40:20 $
  + * @version $Revision: 1.5 $ $Date: 2002/04/11 02:59:42 $
    */
   public class DOMNodePointer extends NodePointer {
       private Node node;
  @@ -150,9 +150,14 @@
           if (s1 == null && s2 != null){
               return false;
           }
  -        if (s1 != null && !s1.equals(s2)){
  +        if (s1 != null && s2 == null){
               return false;
           }
  +
  +        if (s1 != null && !s1.trim().equals(s2.trim())){
  +            return false;
  +        }
  +
           return true;
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to