RFR  8213418: Socket/ServerSocket supportedOptions does not work with custom SocketImpl
chris.hegarty at oracle.com
Wed Nov 7 15:16:15 UTC 2018
Socket and ServerSocket supportedOptions() caches the supported options
in a static field on the assumption that all implementations support
the same set of options. This assumption is incorrect.
The cache can be on a per-socket basis ( which has been implemented in
the webrev ), or maybe even removed completely and just defer to the
impl. The reason I left the per-socket cache is to avoid creating the
additional unmodifiable wrapper for every access ( Argh! why didn't we
specify that SocketImpl::supportedOptions returns an unmodifiable set,
then there would be no need for this defensive wrapper )
This should to be fixed in advance of JEP 337, which will use a RDMA
SocketImpl that supports RDMA specific socket options.
More information about the net-dev