curcuru     2003/05/07 11:58:42

  Modified:    java/xpath_rwapi/src2/org/apache/xpath/impl/parser Tag:
                        xslt20 SimpleNode.java
  Log:
  Ensure non-tree internal methods use worker methods; this 
  is in case we change the m_children metaphor
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.9   +7 -13     
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/SimpleNode.java
  
  Index: SimpleNode.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/SimpleNode.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- SimpleNode.java   31 Mar 2003 23:05:53 -0000      1.1.2.8
  +++ SimpleNode.java   7 May 2003 18:58:42 -0000       1.1.2.9
  @@ -680,12 +680,9 @@
        */
       public Object childrenAccept(XPathVisitor visitor, Object data)
       {
  -        if (m_children != null)
  +        for (int i = 0; i < jjtGetNumChildren(); ++i)
           {
  -            for (int i = 0; i < m_children.length; ++i)
  -            {
  -                m_children[i].jjtAccept(visitor, data);
  -            }
  +            jjtGetChild(i).jjtAccept(visitor, data);
           }
   
           return data;
  @@ -754,16 +751,13 @@
       {
           out.println(toString(prefix));
   
  -        if (m_children != null)
  +        for (int i = 0; i < jjtGetNumChildren(); ++i)
           {
  -            for (int i = 0; i < m_children.length; ++i)
  -            {
  -                SimpleNode n = (SimpleNode) m_children[i];
  +            SimpleNode n = (SimpleNode) jjtGetChild(i);
   
  -                if (n != null)
  -                {
  -                    n.dump(prefix + " ", out);
  -                }
  +            if (n != null)
  +            {
  +                n.dump(prefix + " ", out);
               }
           }
       }
  
  
  

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

Reply via email to