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: marti...@google.com > To: kevin.l.st...@gmail.com; christopher.hega...@sun.com; alan.bate...@sun.com > CC: core-libs-dev@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