FYI: Small Socket clean-up
Bryce McKinlay
mckinlay@redhat.com
Thu Jul 22 09:08:00 GMT 2004
This patch makes the package-private method Socket.getImpl() private.
The comment is no longer valid, because ServerSocket has been changed to
not call getImpl(). In fact, its wrong to call getImpl() outside of the
Socket class, because that can result in file descriptor leaks.
Bryce
2004-07-20 Bryce McKinlay <mckinlay@redhat.com>
* java/net/Socket.java (getImpl): Now private. Remove comment.
--- Socket.java 17 Jul 2004 11:17:28 -0000 1.38
+++ Socket.java 20 Jul 2004 17:44:34 -0000
@@ -311,8 +311,7 @@
// that default. JDK 1.2 doc infers not to do a bind.
}
- // This has to be accessible from java.net.ServerSocket.
- SocketImpl getImpl() throws SocketException
+ private SocketImpl getImpl() throws SocketException
{
try
{
More information about the Java-patches
mailing list