JDK 8 Code review: 7073491 (original) (raw)

Neil Richards neil.richards at ngmr.net
Thu Sep 15 05:12:19 PDT 2011


On Thu, 2011-09-15 at 13:46 +0100, Michael McMahon wrote:

Hi,

Could I get the following code change reviewed please? The problem is in AbstractPlainDatagramSocket.create(). If ResourceManager.beforeUdpCreate() throws an exception then fd is left set in the impl object. And if the finalizer for this object runs then it will attempt to close the object and decrement the counter, thus double counting the close. It only happens via the finalizer because the impl is not returned to the application because the original exception is thrown from a DatagramSocket constructor. http://cr.openjdk.java.net/~michaelm/7073491%3a/ Thanks Michael.

This looks good to me.



More information about the net-dev mailing list