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. git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225912 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9d79137a1e
commit
7d5c881d20
@ -432,9 +432,14 @@ public class AttributesImpl implements Attributes
|
||||
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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user