Hi,
I am currently working to get an application running which depends on
implementation details of the RI.

This changes Container.removeAll() to make it work in a special case
(see added note in patch).

ChangeLog:

2006-05-30  Robert Schuster  <[EMAIL PROTECTED]>

        * java/awt/Container.java:
        (removeAll): Implemented different removal mechanism, added note.

cya
Robert
Index: java/awt/Container.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Container.java,v
retrieving revision 1.91
diff -u -r1.91 Container.java
--- java/awt/Container.java	5 Apr 2006 10:31:26 -0000	1.91
+++ java/awt/Container.java	30 May 2006 17:40:36 -0000
@@ -457,8 +457,15 @@
   {
     synchronized (getTreeLock ())
       {
-        while (ncomponents > 0)
+        // In order to allow the same bad tricks to be used as in RI
+        // this code has to stay exactly that way: In a real-life app
+        // a Container subclass implemented its own vector for
+        // subcomponents, supplied additional addXYZ() methods
+        // and overrode remove(int) (but not removeAll).
+        for ( int i=0; i<ncomponents; i++)
           remove(0);
+        
+        ncomponents = 0;
       }
   }
 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to