6431343: (dc) DatagramChannel may not report its local address correctly after connect or disconnect

Alan Bateman Alan.Bateman at oracle.com
Mon Nov 1 08:57:00 PDT 2010

If a DatagramChannel is bound to the wildcard address then the connect 
can cause the local address is "change" to a specific address. Similarly 
a disconnect can cause it to revert to the wildcard address. This patch 
fixes the getLocalAddress method so that it returns the actual local 
address, bringing it in line with legacy DatagramSocket. The webrev with 
the changes is here:


More information about the nio-dev mailing list