This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Small Socket clean-up
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: classpath-patches at gnu dot org, Java Patches <java-patches at gcc dot gnu dot org>
- Date: Tue, 20 Jul 2004 13:47:49 -0400
- Subject: FYI: Small Socket clean-up
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
{