RFR: 8299513: Cleanup java.io [v2]
Alan Bateman
alanb at openjdk.org
Fri Jan 6 14:00:52 UTC 2023
On Thu, 5 Jan 2023 17:33:05 GMT, Brian Burkhalter <bpb at 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
More information about the core-libs-dev
mailing list