This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gui] Patch: javax.swing.text.AbstractDocument
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 23 Jun 2004 10:00:11 +0200
- Subject: [gui] Patch: javax.swing.text.AbstractDocument
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I just commited the attached patch to fix an issue with using a
protected method from java.util.Vector directly. gcj doesn't found
this problem but jikes did ...
Michael
2004-06-23 Michael Koch <konqueror@gmx.de>
* javax/swing/text/AbstractDocument.java
(replace): Dont use protected method of java.util.Vector directly.
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA2TiTWSOgCCdjSDsRAq7DAJ9FINOK5znvIF53OoES+cIEh63QDACfVKPN
s8EQF4w7xoo6znAPPYKuGSA=
=w7R9
-----END PGP SIGNATURE-----
Index: javax/swing/text/AbstractDocument.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/AbstractDocument.java,v
retrieving revision 1.3.8.7
diff -u -b -B -r1.3.8.7 AbstractDocument.java
--- javax/swing/text/AbstractDocument.java 20 Jun 2004 15:27:41 -0000 1.3.8.7
+++ javax/swing/text/AbstractDocument.java 23 Jun 2004 07:42:05 -0000
@@ -234,9 +234,10 @@
public void replace(int offset, int length, Element[] elems)
{
- children.removeRange(offset, offset + length);
-
for (int index = 0 ; index < length; ++index)
+ children.removeElementAt(offset);
+
+ for (int index = 0 ; index < elems.length; ++index)
children.add(offset + index, elems[index]);
}