--- a/src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java Mon Feb 11 19:16:13 2019 +0000
+++ b/src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java Wed Feb 13 08:29:35 2019 +0000
@@ -275,7 +275,7 @@
if (n == IOStatus.UNAVAILABLE) {
nanos -= System.nanoTime() - startTime;
if (nanos <= 0)
- throw new SocketTimeoutException("read timeout");
+ throw new SocketTimeoutException("Read timed out");
}
} while (n == IOStatus.UNAVAILABLE && isOpen());
} else {
@@ -394,15 +394,6 @@
}
/**
- * For use by ServerSocket to create a new instance of this SocketImpl.
- */
- @Override
- @SuppressWarnings("unchecked")
- public <S extends SocketImpl & PlatformSocketImpl> S newInstance(boolean server) {
- return (S) new NioSocketImpl(server);
- }
-
- /**
* For use by ServerSocket to set the state and other fields after a
* connection is accepted by a ServerSocket using a custom SocketImpl.
* The protected fields defined by SocketImpl should be set.
@@ -567,7 +558,7 @@
if (n == 0) {
nanos -= System.nanoTime() - startTime;
if (nanos <= 0)
- throw new SocketTimeoutException("connect timeout");
+ throw new SocketTimeoutException("Connect timed out");
}
} while (n == 0 && isOpen());
} else {
@@ -690,7 +681,7 @@
if (n == IOStatus.UNAVAILABLE) {
nanos -= System.nanoTime() - startTime;
if (nanos <= 0)
- throw new SocketTimeoutException("accept timeout");
+ throw new SocketTimeoutException("Accept timed out");
}
} while (n == IOStatus.UNAVAILABLE && isOpen());
} else {