On Thu, 5 Jan 2023 12:29:20 GMT, Per Minborg <pminb...@openjdk.org> wrote:
>> I think the casts are worth it to set `lock` only once during construction, >> but would be inclined to leave out the addition of `checkSize`. > > I have added a new proposal in the hope that the `requireNonNegative` method > name and parameters should be trivial enough for users to directly understand > without scrolling down. Let me know your thought on this. That is definitely better but I would be inclined to place `requireNonNegative()` between the constructors and the instance methods. ------------- PR: https://git.openjdk.org/jdk/pull/11848