classpath
[Top][All Lists]
Advanced

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

[PATCH] small fix for ServerSocket close


From: Dalibor Topic
Subject: [PATCH] small fix for ServerSocket close
Date: Thu, 13 Nov 2003 15:35:47 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Hi all,

attached is a small fix for ServerSocket's close method. It fixes a NullPointerException when attempting to close a ServerSocket twice.

2003-11-13  Guilhem Lavaux <address@hidden>
        * java/net/ServerSocket.java:
        (close) Check if server socket has already been released,
        before attepting to close it.

--- /var/tmp/PROJECTS/classpath//./java/net/ServerSocket.java   Fri Oct 17 
19:05:29 2003
+++ java/net/ServerSocket.java  Wed Oct 22 21:32:21 2003
@@ -339,7 +339,8 @@
    */
   public void close () throws IOException
   {
-    impl.close ();
+    if (impl != null)
+      impl.close ();
 
     if (getChannel() != null)
       getChannel().close ();

reply via email to

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