8238231: Custom DatagramSocketImpl's create method not called when with protected constructor

Daniel Fuchs daniel.fuchs at oracle.com
Fri Jan 31 16:46:27 UTC 2020


Hi,

Please find below a fix for:

8238231: Custom DatagramSocketImpl's create method not called when
          with protected constructor
https://bugs.openjdk.java.net/browse/JDK-8238231

This is a behavioral regression introduced by JDK-8236925 [1].
Thanks Alan for providing a suggested fix. I have chosen
a slightly different alternative to preserve the previous
behavior where create() was always called by the public
constructors (and only lazily after the protected one) [2].

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

best regards,

-- daniel

[1] https://bugs.openjdk.java.net/browse/JDK-8236925
[2] 
http://hg.openjdk.java.net/jdk/jdk14/file/f8bf9cb16b5e/src/java.base/share/classes/java/net/DatagramSocket.java#l284


More information about the net-dev mailing list