RFR: 8278326: Socket close is not thread safe and other cleanup
Alan Bateman
alanb at openjdk.org
Mon Jan 9 12:19:52 UTC 2023
On Mon, 9 Jan 2023 11:00:47 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> Permission checks in constructors of non-final classes are problematic when the subclass has a finalizer. It's fixed here with the same idiom that we use in other places. The return is used by as parameter so it has to be Void.
>
> Okay, it just seemed odd that `checkPermission` already had return type Void as if a change like this was started but not completed.
Yeah, this idiom might be confusing when you see it first time. The checkPermission method could return another type, we've just used Void to make it a bit clearer that the parameter is not used.
-------------
PR: https://git.openjdk.org/jdk/pull/11863
More information about the net-dev
mailing list