You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-cvs@xml.apache.org by ga...@apache.org on 2001/05/31 20:08:24 UTC
cvs commit: xml-commons/java/external/src/org/xml/sax/helpers AttributesImpl.java
garyp 01/05/31 11:08:23
Modified: java/external/src/org/xml/sax/helpers AttributesImpl.java
Log:
Fixed removeAttribute bug pointed out by by dims. This should be fixed in the next release of SAX.
Made the same change to both Xalan and xml-commons.
Revision Changes Path
1.2 +7 -2 xml-commons/java/external/src/org/xml/sax/helpers/AttributesImpl.java
Index: AttributesImpl.java
===================================================================
RCS file: /home/cvs/xml-commons/java/external/src/org/xml/sax/helpers/AttributesImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AttributesImpl.java 2001/05/20 03:12:58 1.1
+++ AttributesImpl.java 2001/05/31 18:08:19 1.2
@@ -2,7 +2,7 @@
// Written by David Megginson, sax@megginson.com
// NO WARRANTY! This class is in the public domain.
-// $Id: AttributesImpl.java,v 1.1 2001/05/20 03:12:58 curcuru Exp $
+// $Id: AttributesImpl.java,v 1.2 2001/05/31 18:08:19 garyp Exp $
package org.xml.sax.helpers;
@@ -432,9 +432,14 @@
public void removeAttribute (int index)
{
if (index >= 0 && index < length) {
+ data[index*5] = null;
+ data[index*5+1] = null;
+ data[index*5+2] = null;
+ data[index*5+3] = null;
+ data[index*5+4] = null;
if (index < length - 1) {
System.arraycopy(data, (index+1)*5, data, index*5,
- (length-index)*5);
+ (length-index-1)*5);
}
length--;
} else {