You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by er...@apache.org on 2004/09/20 09:01:09 UTC

cvs commit: xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2 Jsr173.java

ericvas     2004/09/20 00:01:09

  Modified:    v2/src/newstore2/org/apache/xmlbeans/impl/newstore2
                        Jsr173.java
  Log:
  Fixed XMLStreamReader Bug - released a cur I cshould not have
  
  Revision  Changes    Path
  1.17      +3 -7      xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Jsr173.java
  
  Index: Jsr173.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Jsr173.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Jsr173.java	14 Sep 2004 02:01:28 -0000	1.16
  +++ Jsr173.java	20 Sep 2004 07:01:09 -0000	1.17
  @@ -54,11 +54,7 @@
       {
           Cur c = gw._xs.getStreamCur();
   
  -        Node n = c.isNode() ? (Node) c.getDom() : (Node) null;
  -
  -        c.release();
  -
  -        return n;
  +        return c.isNode() ? (Node) c.getDom() : (Node) null;
       }
   
       public static XMLStreamReader newXmlStreamReader ( Cur c, Object src, int off, int cch )
  @@ -115,7 +111,7 @@
           public XMLStreamReaderForNode ( Cur c, boolean inner )
           {
               super( c );
  -
  +            
               assert c.isContainer() || c.isComment() || c.isProcinst() || c.isAttr();
   
               // Iterate over everything *between* _cur and _end.  Do
  @@ -214,7 +210,7 @@
               checkChanged();
   
               if (!hasNext())
  -                throw new IllegalStateException();
  +                throw new IllegalStateException( "No next event in stream" );
   
               int kind = _cur.kind();
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org