On Thu, Nov 13, 2003 at 03:35:47PM +0100, Dalibor Topic wrote:
> 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 <[EMAIL PROTECTED]>
> * 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 ();
After thinking about this patch, its more and more bogus in my eyes as
impl never may be null. I provided a better fix to libgcj. When its
approved I will merge it into classpath too.
What would really interest me is the testcase from Guilhem that
triggered this.
Michael
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath