This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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]);
     }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]