You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Lukasz Lenart <lu...@googlemail.com> on 2011/06/07 08:23:22 UTC

Re: org.apache.struts2.util.MakeIterator

2011/5/30 Jason Pyeron <jp...@pdinc.us>:
> In the convert method:
>
>        } else if (value instanceof Enumeration) {
>            Enumeration enumeration = (Enumeration) value;
>            ArrayList list = new ArrayList();
>
>            while (enumeration.hasMoreElements()) {
>                list.add(enumeration.nextElement());
>            }
>
>            iterator = list.iterator();
>        } else {
>
>
> Why is a wrapper not being used? This is in effect doing double iteration, extra
> memory, etc.
>
> There is a wrapper in org.apache.struts2.util.IteratorFilterSupport:
> EnumerationIterator.
>
> Any reasons it should not be patched?

Nop, I think it was simple oversight ;-)


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: org.apache.struts2.util.MakeIterator

Posted by Lukasz Lenart <lu...@googlemail.com>.
Done, thanks!

2011/6/7 Jason Pyeron <jp...@pdinc.us>:
>> -----Original Message-----
>> From: Lukasz Lenart
>> Sent: Tuesday, June 07, 2011 2:23
>> To: Struts Developers List
>> Subject: Re: org.apache.struts2.util.MakeIterator
>>
>> 2011/5/30 Jason Pyeron <jp...@pdinc.us>:
>> > In the convert method:
>> >
>> >        } else if (value instanceof Enumeration) {
>> >            Enumeration enumeration = (Enumeration) value;
>> >            ArrayList list = new ArrayList();
>> >
>> >            while (enumeration.hasMoreElements()) {
>> >                list.add(enumeration.nextElement());
>> >            }
>> >
>> >            iterator = list.iterator();
>> >        } else {
>> >
>> >
>> > Why is a wrapper not being used? This is in effect doing double
>> > iteration, extra memory, etc.
>> >
>> > There is a wrapper in org.apache.struts2.util.IteratorFilterSupport:
>> > EnumerationIterator.
>> >
>> > Any reasons it should not be patched?
>>
>> Nop, I think it was simple oversight ;-)
>
> https://issues.apache.org/jira/browse/WW-3645
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -                                                               -
> - Jason Pyeron                      PD Inc. http://www.pdinc.us -
> - Principal Consultant              10 West 24th Street #100    -
> - +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
> -                                                               -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This message is copyright PD Inc, subject to license 20080407P00.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


RE: org.apache.struts2.util.MakeIterator

Posted by Jason Pyeron <jp...@pdinc.us>.
> -----Original Message-----
> From: Lukasz Lenart 
> Sent: Tuesday, June 07, 2011 2:23
> To: Struts Developers List
> Subject: Re: org.apache.struts2.util.MakeIterator
> 
> 2011/5/30 Jason Pyeron <jp...@pdinc.us>:
> > In the convert method:
> >
> >        } else if (value instanceof Enumeration) {
> >            Enumeration enumeration = (Enumeration) value;
> >            ArrayList list = new ArrayList();
> >
> >            while (enumeration.hasMoreElements()) {
> >                list.add(enumeration.nextElement());
> >            }
> >
> >            iterator = list.iterator();
> >        } else {
> >
> >
> > Why is a wrapper not being used? This is in effect doing double 
> > iteration, extra memory, etc.
> >
> > There is a wrapper in org.apache.struts2.util.IteratorFilterSupport:
> > EnumerationIterator.
> >
> > Any reasons it should not be patched?
> 
> Nop, I think it was simple oversight ;-)

https://issues.apache.org/jira/browse/WW-3645

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org