7026376: (dc) DatagramChannel created without specifying protocol family fails to join IPv4 group

Alan Bateman Alan.Bateman at oracle.com
Tue Mar 15 02:41:05 PDT 2011

Chris Hegarty wrote:
> :
> I'm fine with this change as is, but here are a few minor comments:
> In DatagramChannelImpl.innerJoin() the
>   else { throw new IllegalArgumentException("Address type not 
> supported"); }
>  seems unnecessary, but maybe ok if we expect support for new protocol 
> families to be added DatagramChannelImpl.
You're right, this is really a "should not reach here" path and should 
be an AssertionError. I'll fix that.
> I guess canJoin6WithIPv4Group and canIPv6SocketJoinIPv4Group don't 
> have to be implemented as native methods, but they look fine.
I toyed with an additional class to encapsulate the platform 
capabilities but it would require a class per platform and hardly seems 
worth it for this.


More information about the nio-dev mailing list