On Thu, 5 Jan 2023 17:33:05 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> 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.

It's a bit better but I think the original code is clearer/simpler, in 
particular it makes it clear that buf is used as the lock object. I realise 
this is very subjective but I think my preference would be to prefer that part 
and just make `buf` final.

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

PR: https://git.openjdk.org/jdk/pull/11848

Reply via email to