--- a/jdk/src/share/classes/sun/nio/ch/SocketAdaptor.java Fri Nov 25 10:34:05 2011 +0000
+++ b/jdk/src/share/classes/sun/nio/ch/SocketAdaptor.java Fri Nov 25 13:46:28 2011 +0000
@@ -57,13 +57,17 @@
// Timeout "option" value for reads
private volatile int timeout = 0;
- // ## super will create a useless impl
- private SocketAdaptor(SocketChannelImpl sc) {
+ private SocketAdaptor(SocketChannelImpl sc) throws SocketException {
+ super((SocketImpl) null);
this.sc = sc;
}
public static Socket create(SocketChannelImpl sc) {
- return new SocketAdaptor(sc);
+ try {
+ return new SocketAdaptor(sc);
+ } catch (SocketException e) {
+ throw new InternalError("Should not reach here");
+ }
}
public SocketChannel getChannel() {