Re: [PATCH] small fix for ServerSocket close
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.javaWed 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
Re: [PATCH] small fix for ServerSocket close
Dalibor Topic wrote: Hi Michael, Michael Koch wrote: --- /var/tmp/PROJECTS/classpath//./java/net/ServerSocket.javaFri Oct 17 19:05:29 2003 +++ java/net/ServerSocket.javaWed 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. Not yet, but soon it will. ServerSocket is still broken with respect to how it behaves when it's closed. When the socket is closed, access to methods like accept() should throw an IOException that it's closed. Currently, no such checks It should throw a SocketException, actually ;) I got carried away by my implementation details from java.io. fixes to kaffe. But you get the idea. cheers, dalibor topic ___ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath
Re: [PATCH] small fix for ServerSocket close
Hi, On Wed, 2003-11-19 at 14:13, Michael Koch wrote: --- /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. You are right. I saw your patch on the java-patches mailinglist to make sure impl will never be null. Sorry for not investigation the root cause before committing it. But it looked like having an extra sanity check here wouldn't hurt. I hope to propose a bit more formal patch/commit strategy in the next couple of weeks (like libgcj already has). Now that we are attracting more and more developers with different background it would be nice to have more formal procedure so that a) patches are not lost, b) all patches are actually reviewed. What would really interest me is the testcase from Guilhem that triggered this. Yes, that would be nice. I did test it against Mauve with Kissme before checking in (please never check something in if you cannot test it against Mauve and some VM). But since there were multiple tests broken already I hope that I can cleanup Mauve enough before next week (when we will create the 0.07 snapshot release) to activate a autobuilder which we can use to track failures. But Currently Mauve is still to fragile for this. Cheers, Mark signature.asc Description: This is a digitally signed message part ___ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath
Re: [PATCH] small fix for ServerSocket close
Mark == Mark Wielaard [EMAIL PROTECTED] writes: Mark I hope that I can cleanup Mauve enough before next week (when we Mark will create the 0.07 snapshot release) to activate a autobuilder Mark which we can use to track failures. But Currently Mauve is still Mark to fragile for this. FWIW, I run Mauve as part of my nightly builds. I don't think Mauve is all that fragile, it hardly ever seems to be the part of the process that has trouble. These days the nightly tester is doing quite a bit: * Build gcc from scratch. Run the test suite including Mauve and Jacks * Build classpath from scratch with new gcj and jikes * Build rhug with new gcj * Build GNU Crypto and Kawa with gcj * Run Classpath/libgcj comparison and JAPI comparison Also I run the test suites for all of these things. Some of it doesn't work that reliably... rhug hasn't built completely in months, classpath fails with gcj. Of course, I wouldn't know that without the nightly tester :-) I'm not publishing the info anywhere, I just have it send me email. And the scripts to do all this are a little ugly. Still, as long as the builds are done when I start work in the morning, I'm happy to add stuff... ideally I'd have a recipe (so I don't have to think :-). I'd be happy to send the reports somewhere, too, if there were agreement on where. Tom ___ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath
Re: [PATCH] small fix for ServerSocket close
Hi, On Fri, 2003-11-14 at 05:16, Brian Jones wrote: Michael Koch [EMAIL PROTECTED] writes: I think it would be really nice i you could commit this to libgcj too. This class is totally merged. Just out of my curiosity, how does that whole process work? libgcj and GNU Classpath are mostly completely merged. Basically people monitor both the classpath-commit and the gcj java-patches mailinglist and pick up patches that have not been approved/committed to both trees. Most libgcj committers also have Classpath commit access and commit their changes to Classpath as soon as they are accepted for libgcj. (libgcj has a good review process that I hope we can adopt in the future for Classpath.) Normally I test almost every change I make against both Classpath (+Kissme) and gcj so that I can commit to both trees at once (after approval on java-patches). At the moment I have a slightly hacked up gcj here so I cannot easily test my patches on gcj so I don't submit patches to them at the moment. And from time to time people go through the following page http://gcc.gnu.org/java/libgcj-classpath-compare.html to see what has not gone into both trees and suggest to merge those things. (Hopefully when kaffe is more merged with Classpath we can have a similar page to compare kaffe-classpath). Michael has been a big help here keeeping Classpath/libgcj in sync. Thanks Michael. Cheers, Mark signature.asc Description: This is a digitally signed message part ___ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath
[PATCH] small fix for ServerSocket close
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 (); ___ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath
Re: [PATCH] small fix for ServerSocket close
Hi, On Thu, 2003-11-13 at 15:35, Dalibor Topic wrote: attached is a small fix for ServerSocket's close method. It fixes a NullPointerException when attempting to close a ServerSocket twice. Thanks. Checked in as obvious. Only slightly reformatted the ChangeLog entry. 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. Cheers, Mark signature.asc Description: This is a digitally signed message part ___ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath
Re: [PATCH] small fix for ServerSocket close
On Thu, Nov 13, 2003 at 06:47:30PM +0100, Mark Wielaard wrote: Hi, On Thu, 2003-11-13 at 15:35, Dalibor Topic wrote: attached is a small fix for ServerSocket's close method. It fixes a NullPointerException when attempting to close a ServerSocket twice. Thanks. Checked in as obvious. Only slightly reformatted the ChangeLog entry. 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. I think it would be really nice i you could commit this to libgcj too. This class is totally merged. Michael ___ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath
Re: [PATCH] small fix for ServerSocket close
Michael Koch [EMAIL PROTECTED] writes: I think it would be really nice i you could commit this to libgcj too. This class is totally merged. Just out of my curiosity, how does that whole process work? Brian -- Brian Jones [EMAIL PROTECTED] ___ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath