RFR[8243488]: 'Add tests for set/get SendBufferSize and getReceiveBufferSize in DatagramSocket'
Daniel Fuchs
daniel.fuchs at oracle.com
Thu Apr 30 11:32:15 UTC 2020
On 30/04/2020 12:24, Alan Bateman wrote:
> It's a naming issue mostly. If DSF is renamed to something like
> DatagramSocketSupplier then it might be a bit clearer. We have something
> similar in PrintSupportedOptions - I was reminded of that with the
> changes for ADQ that are currently under discussion here.
OK - the poor name is mostly an attempt to avoid too long
lines because of the required cast in the data provider.
But maybe we could work around that by moving the of method
in the outer class - something like:
@FunctionalInterface
interface DatagramSocketSupplier {
DatagramSocket open() throws IOException;
}
static DatagramSocketSupplier supplier(DatagramSocketSupplier ds) {
return ds;
}
...
{ "DatagramSocket", supplier(() -> new DatagramSocket()) }
best regards,
-- daniel
More information about the net-dev
mailing list