Thank you.

> On Jun 10, 2020, at 2:10 PM, Martin Buchholz <marti...@google.com> wrote:
> 
> On Wed, Jun 10, 2020 at 9:35 AM Jim Laskey <james.las...@oracle.com> wrote:
> 
>>> ---
>>> It looks like
>>> newCap > oldCap
>>> is always true, so we should delete the test?
>>>                if (newCap > oldCap && queue == array)
>>> ---
>> 
>> If oldCap == MAX_ARRAY_SIZE wouldn't newCap == oldCap
> 
> newLength's contract is to return a value at least larger by
> minGrowth, or throw.
> 
> I looked around for tests for newLength, but couldn't find any.
> We should add those.
> In particular, check that e.g.
> newLength(MAX_ARRAY_LENGTH, 1, 42) == Integer.MAX_VALUE
> newLength(Integer.MAX_VALUE, 1, 42) => OOME

Reply via email to