grchiu      2003/07/23 13:19:44

  Modified:    java/src/org/apache/xpath/axes DescendantIterator.java
  Log:
  Fix for bugzilla 21713: need to check m_allowDetach before detach()ing an
  iterator of type DescendantIterator. (Thanks to Morris Kwan for reviewing
  this patch.)
  
  Revision  Changes    Path
  1.19      +8 -6      
xml-xalan/java/src/org/apache/xpath/axes/DescendantIterator.java
  
  Index: DescendantIterator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/axes/DescendantIterator.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DescendantIterator.java   30 Jan 2003 18:46:23 -0000      1.18
  +++ DescendantIterator.java   23 Jul 2003 20:19:44 -0000      1.19
  @@ -370,12 +370,14 @@
      * exception INVALID_STATE_ERR.
      */
     public void detach()
  -  {    
  -    m_traverser = null;    
  -    m_extendedTypeID = 0;
  -    
  -    // Always call the superclass detach last!
  -    super.detach();
  +  {
  +    if (m_allowDetach) {
  +      m_traverser = null;    
  +      m_extendedTypeID = 0;
  +
  +      // Always call the superclass detach last!
  +      super.detach();
  +    }
     }
     
     /**
  
  
  

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

Reply via email to