dev@javaserverfaces.java.net

Re: [REVIEW] Minor cleanup of ConfigureListener

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Thu, 24 Aug 2006 14:40:26 -0700

Jason Lee wrote:
> Looks good to me. I would note this, though. There are several changes
> like this one:
>
> - for (i = 0, len = PRIM_CLASSES_TO_CONVERT.length; i < len; i++)
> {
> + for (int i = 0; i < PRIM_CLASSES_TO_CONVERT.length; i++) {
>
> Correct me if I'm wrong, but the first way is often done to avoid the
> "call" to length with every iteration. It's a performance choice, from
> what I understand. If I'm wrong on that and/or you're ok with your
> change:
>
I changed it and all other for loops to

for (i = 0, len = ...

In my testing there is very little difference unless the arrays are large, but
best to be consistent.

Thanks for the review.

> r=jdlee
>
> -----
> Jason Lee
> Programmer/Analyst
> http://www.iecokc.com
>
>
>
>> -----Original Message-----
>> From: Ryan.Lubke_at_Sun.COM [mailto:Ryan.Lubke_at_Sun.COM]
>> Sent: Thursday, August 24, 2006 3:53 PM
>> To: dev_at_javaserverfaces.dev.java.net
>> Subject: [REVIEW] Minor cleanup of ConfigureListener
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>