--- a/jdk/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java Thu Oct 30 07:30:33 2014 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java Thu Oct 30 11:31:17 2014 -0700
@@ -247,7 +247,7 @@
return null;
thread = NativeThread.current();
for (;;) {
- n = accept0(this.fd, newfd, isaa);
+ n = accept(this.fd, newfd, isaa);
if ((n == IOStatus.INTERRUPTED) && isOpen())
continue;
break;
@@ -410,6 +410,18 @@
return sb.toString();
}
+ /**
+ * Accept a connection on a socket.
+ *
+ * @implNote Wrap native call to allow instrumentation.
+ */
+ private int accept(FileDescriptor ssfd, FileDescriptor newfd,
+ InetSocketAddress[] isaa)
+ throws IOException
+ {
+ return accept0(ssfd, newfd, isaa);
+ }
+
// -- Native methods --
// Accepts a new connection, setting the given file descriptor to refer to