[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-net-dev
Subject:    Re: 8238231: Custom DatagramSocketImpl's create method not called when with protected constructor
From:       Daniel Fuchs <daniel.fuchs () oracle ! com>
Date:       2020-01-31 21:42:53
Message-ID: b306d046-7f3d-e0dd-d940-c619fca06829 () oracle ! com
[Download RAW message or body]

On 31/01/2020 20:45, Alan Bateman wrote:
> On 31/01/2020 19:42, Daniel Fuchs wrote:
> Good, this version is correct. I see that getImpl() is synchronizing on 
> "this". I guess that is okay but synchronizing on the impl is another 
> choice here.

Yes. Well I syncronized on `this` because other methods such as
`bind` or `connectInternal` already synchronize on `this`.
If the impl has not been created it's more likely that it will
be by one of these.

> Did you mean to include the SetReceiveBufferSize test in this webrev? 
> The change is okay but if we are touching that test then it would be 
> better to change it to try-with-resources.

Yes - I noticed the leak a few days ago. I was waiting for an
opportunity to push it. Changed as suggested.

http://cr.openjdk.java.net/~dfuchs/webrev_8238231/webrev.03/\

-- daniel

> 
> -Alan

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic