You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/02/22 19:50:55 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/stree ElementImpl.java

sboag       01/02/22 10:50:54

  Modified:    java/src/org/apache/xalan/stree ElementImpl.java
  Log:
  Bug fix attributed to Norman Walsh <nd...@nwalsh.com>, on
  02/20/2001 09:50 AM.  if the attribute 'name' doesn't occur in the AttList, the
  result of getIndex(name) is -1, but
  getChildAttribute() would incorrectly
  return the first attribute.  Fix returns
  null if index < 0.
  
  Revision  Changes    Path
  1.26      +2 -0      xml-xalan/java/src/org/apache/xalan/stree/ElementImpl.java
  
  Index: ElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/ElementImpl.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ElementImpl.java	2001/01/29 11:49:04	1.25
  +++ ElementImpl.java	2001/02/22 18:50:50	1.26
  @@ -181,6 +181,8 @@
     public AttrImpl getChildAttribute(int i)
             throws ArrayIndexOutOfBoundsException, NullPointerException
     {
  +    if(i < 0)  // bug fix attributed to Norman Walsh <nd...@nwalsh.com>
  +      return null; 
   
       synchronized (m_doc)
       {