On Mon, 9 Jun 2025 11:58:03 GMT, kabutz <d...@openjdk.org> wrote:

>> @kabutz I'd think maintaining the invariants within linkFirst and linkLast 
>> would be preferable (`count` must be re-read under the lock anyway)
>
> What would you like to do if the invariant fails inside linkFirst() and 
> linkLast()? Should we throw an AssertionError each time?

No, I was more thinking keeping it as it was: (return true/false from linkFirst 
/ linkLast depending on whether it passes the capacity check or not)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24925#discussion_r2135696882

Reply via email to