Please find the attached patch for bug# 2195 (fix given by Glenn Marcy).

Pavani

-- 

Pavani Mukthipudi
Sun Microsystems Inc.

Phone: 080 - 2298989   Extn: 87390
Index: XMLAttributesImpl.java
===================================================================
RCS file: 
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/util/XMLAttributesImpl.java,v
retrieving revision 1.2
diff -u -r1.2 XMLAttributesImpl.java
--- XMLAttributesImpl.java      2001/08/23 00:35:32     1.2
+++ XMLAttributesImpl.java      2001/09/07 04:51:18
@@ -200,10 +200,12 @@
      * @param attrIndex The attribute index.
      */
     public void removeAttributeAt(int attrIndex) {
-        if (attrIndex < fLength - 1) {
-            System.arraycopy(fAttributes, attrIndex + 1, fAttributes, attrIndex, 
fLength - attrIndex - 1);
+       fLength--;
+        if (attrIndex < fLength) {
+           Attribute old = fAttributes[attrIndex];
+            System.arraycopy(fAttributes, attrIndex + 1, fAttributes, attrIndex, 
+fLength - attrIndex);
+           fAttributes[fLength] = old;
         }
-        fLength--;
     } // removeAttributeAt(int)
 
     /**

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

Reply via email to