Bugs in java.util.ArrayList, java.util.Hashtable and java.io.ByteArrayOutputStream
Dmytro Sheyko
dmytro_sheyko at hotmail.com
Tue Mar 9 10:19:08 UTC 2010
Is there any reason to use comparison like this
if (newCapacity - minCapacity < 0)
if (newCapacity - MAX_ARRAY_SIZE > 0) {
instead of
if (newCapacity < minCapacity)
if (newCapacity > MAX_ARRAY_SIZE) {
Thanks,
Dmytro
> Date: Mon, 8 Mar 2010 18:10:37 -0800
> Subject: Re: Bugs in java.util.ArrayList, java.util.Hashtable and java.io.ByteArrayOutputStream
> From: martinrb at google.com
> To: kevin.l.stern at gmail.com; christopher.hegarty at sun.com; alan.bateman at sun.com
> CC: core-libs-dev at openjdk.java.net
>
> [Chris or Alan, please review and file a bug]
>
> OK, guys,
>
> Here's a patch:
>
> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/ArrayResize/
>
> Martin
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20100309/b1ec450e/attachment.html>
More information about the core-libs-dev
mailing list