Unnecessary logic is added to removeFirst and removeLast of ArrayList.
Raffaello Giulietti
raffaello.giulietti at oracle.com
Fri May 9 08:55:38 UTC 2025
Hi,
when the size if not zero, the logic in removeFirst() avoids an index
check, which however must be enforced in remove(int).
There's no need for a "fix".
On 2025-05-09 10:31, 임민수 wrote:
> Hi.
>
> In removeFirst, if size is not 0, the logic is the same as the remove logic.
>
> removeLast also has the same logic as remove when size is not exceeded.
>
> I want to fix this.
>
> thank you.
>
More information about the core-libs-dev
mailing list