[9] RFR of 8071599: (so) Socket adapter sendUrgentData throws IllegalBlockingMode when channel configured non-blocking
Brian Burkhalter
brian.burkhalter at oracle.com
Mon Feb 23 21:13:13 UTC 2015
Please review at your convenience. Note that this follows from previous discussions [1, 2].
Issue: https://bugs.openjdk.java.net/browse/JDK-8071599
Patch: http://cr.openjdk.java.net/~bpb/8071599/webrev.00/
This patch passes the JPRT job with testset core and onlytests jdk_nio.
The changes to SocketChannelImpl.{java,c} are intended to guarantee consistent exception behavior across all platforms. If this is not considered important, then those changes could be suppressed and the SocketAdaptor change
public void sendUrgentData(int data) throws IOException {
synchronized (sc.blockingLock()) {
int n = sc.sendOutOfBandData((byte) data);
if (n == 0)
throw new IOException("Socket buffer full");
}
}
should suffice.
Thanks,
Brian
[1] http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-February/031698.html (should have been in nio-dev)
[2] http://mail.openjdk.java.net/pipermail/nio-dev/2015-February/003042.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20150223/b2bcc68c/attachment-0001.html>
More information about the nio-dev
mailing list