You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mikhail Loenko <ml...@gmail.com> on 2006/07/11 05:25:22 UTC

[classlib] fix for HARMONY-743

Hi Tim

you've fixed check for parameters in one of the "(byte[], int, int)" methods
in a way different to how we fixed them before:

offset < 0 || len < 0 || (long)offset + (long)len > input.length

compare to e.g HARMONY-377 or -437:

count < 0 || offset < 0 || offset > buffer.length || count >
buffer.length - offset

Does it make sense to fix all similar methods in the same way? (I like
your fix as it's shorter)

Thanks,
Mikhail

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib] fix for HARMONY-743

Posted by Tim Ellison <t....@gmail.com>.
Mikhail Loenko wrote:
> Hi Tim
> 
> you've fixed check for parameters in one of the "(byte[], int, int)"
> methods
> in a way different to how we fixed them before:
> 
> offset < 0 || len < 0 || (long)offset + (long)len > input.length
> 
> compare to e.g HARMONY-377 or -437:
> 
> count < 0 || offset < 0 || offset > buffer.length || count >
> buffer.length - offset
> 
> Does it make sense to fix all similar methods in the same way? (I like
> your fix as it's shorter)

For this example, I don't think it makes much difference.

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib] fix for HARMONY-743

Posted by Alexey Petrenko <al...@gmail.com>.
I agree that first one is better.

2006/7/11, Mikhail Loenko <ml...@gmail.com>:
> Hi Tim
>
> you've fixed check for parameters in one of the "(byte[], int, int)" methods
> in a way different to how we fixed them before:
>
> offset < 0 || len < 0 || (long)offset + (long)len > input.length
>
> compare to e.g HARMONY-377 or -437:
>
> count < 0 || offset < 0 || offset > buffer.length || count >
> buffer.length - offset
>
> Does it make sense to fix all similar methods in the same way? (I like
> your fix as it's shorter)
>
> Thanks,
> Mikhail
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Alexey A. Petrenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org