Hi Dieter. [EMAIL PROTECTED]: > Modified: > xmlgraphics/batik/trunk/sources/org/apache/batik/anim/timing/TimeContainer.java > URL: > http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/anim/timing/TimeContainer.java?view=diff&rev=516981&r1=516980&r2=516981 > ============================================================================== > --- > xmlgraphics/batik/trunk/sources/org/apache/batik/anim/timing/TimeContainer.java > (original) > +++ > xmlgraphics/batik/trunk/sources/org/apache/batik/anim/timing/TimeContainer.java > Sun Mar 11 11:31:53 2007 … > @@ -53,10 +57,10 @@ > e.root = root; > if (e instanceof TimeContainer) { > TimeContainer c = (TimeContainer) e; > - TimedElement[] es = c.getChildren(); > - for (int i = 0; i < es.length; i++) { > - setRoot(es[i], root); > - } > + TimedElement[] es = c.getChildren(); // cameron: is there > specific need to > + for (int i = 0; i < es.length; i++) { // use > c.getChildren() ?? I'd propose > + setRoot(es[i], root); // to iterate over > c.children directly, > + } // this avoids > creating the array > } > }
I don’t think there is a real need to have these returned in an array. The only places that call TimeContainer.getChildren() are TimedDocumentRoot.seekTo and TimeContainer.setRoot. Replacing these uses with an (immutable) Iterator would be fine, I think. -- Cameron McCormack, http://mcc.id.au/ xmpp:[EMAIL PROTECTED] ▪ ICQ 26955922 ▪ MSN [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
