This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
      {



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]