classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Small Socket clean-up


From: Bryce McKinlay
Subject: [cp-patches] FYI: Small Socket clean-up
Date: Tue, 20 Jul 2004 13:47:49 -0400
User-agent: Mozilla Thunderbird 0.5 (X11/20040626)

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  <address@hidden>

   * 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
      {






reply via email to

[Prev in Thread] Current Thread [Next in Thread]