commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmi...@apache.org
Subject cvs commit: jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes RootContext.java
Date Sat, 08 Jun 2002 22:45:25 GMT
dmitri      2002/06/08 15:45:25

  Modified:    jxpath/src/java/org/apache/commons/jxpath/ri/axes
                        RootContext.java
  Log:
  Fixed pointer wrapping bug
  
  Revision  Changes    Path
  1.8       +11 -5     jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java
  
  Index: RootContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RootContext.java	28 Apr 2002 04:35:48 -0000	1.7
  +++ RootContext.java	8 Jun 2002 22:45:25 -0000	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java,v
1.7 2002/04/28 04:35:48 dmitri Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/04/28 04:35:48 $
  + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java,v
1.8 2002/06/08 22:45:25 dmitri Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/06/08 22:45:25 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -72,7 +72,7 @@
    * EvalContext that is used to hold the root node for the path traversal.
    *
    * @author Dmitri Plotnikov
  - * @version $Revision: 1.7 $ $Date: 2002/04/28 04:35:48 $
  + * @version $Revision: 1.8 $ $Date: 2002/06/08 22:45:25 $
    */
   public class RootContext extends EvalContext {
       private boolean startedSet = false;
  @@ -127,7 +127,13 @@
       }
   
       public EvalContext getConstantContext(Object constant){
  -        NodePointer pointer = NodePointer.newNodePointer(new QName(null, ""), constant,
null);
  +        NodePointer pointer;
  +        if (constant instanceof NodePointer){
  +            pointer = (NodePointer)constant;
  +        }
  +        else {
  +            pointer = NodePointer.newNodePointer(new QName(null, ""), constant, null);
  +        }
           return new InitialContext(new RootContext(parent, pointer));
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message