--- a/jdk/src/java.base/unix/classes/java/net/PlainSocketImpl.java Fri Jan 15 10:30:56 2016 -0800
+++ b/jdk/src/java.base/unix/classes/java/net/PlainSocketImpl.java Sat Jan 16 00:27:53 2016 +0300
@@ -61,6 +61,9 @@
if (!name.equals(ExtendedSocketOptions.SO_FLOW_SLA)) {
super.setOption(name, value);
} else {
+ if (getSocket() == null || !flowSupported()) {
+ throw new UnsupportedOperationException("unsupported option");
+ }
if (isClosedOrPending()) {
throw new SocketException("Socket closed");
}
@@ -75,6 +78,9 @@
if (!name.equals(ExtendedSocketOptions.SO_FLOW_SLA)) {
return super.getOption(name);
}
+ if (getSocket() == null || !flowSupported()) {
+ throw new UnsupportedOperationException("unsupported option");
+ }
if (isClosedOrPending()) {
throw new SocketException("Socket closed");
}