This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] for Review: Fix for fix for PR 13102
On Thu, Nov 20, 2003 at 01:03:13PM -0600, Mohan Embar wrote:
> Hi Michael,
>
> This patch is a follow-up for this:
>
> http://gcc.gnu.org/ml/java-patches/2003-q4/msg00398.html
>
> ...which I'm sorry I only skimmed before you
> checked in.
I really wonder why people send some patches just before I can finish
the same work ?
> I ran into problems when running your patch with
> my network test. I think the problem is due
> to the use of s.impl in ServerSocket.implAccept()
> given that impl hasn't been initialized yet.
> However, you made Socket.getImpl() private.
Problems compiling ?
> What I did was made Socket.getImpl() package-private
> instead of private, but this then caused an
> overload problem with NIOSocket. Therefore, I
> renamed this to getSocketImpl().
>
> While I was in Socket.java, I made a new
> method which calls getSocketImpl() but eats
> the SocketException. This simplified a few methods
> like getPort(), getLocalPort(), etc. I called
> this new method getImpl() (not to be confused
> with the old getImpl() which is now getSocketImpl() :) )
This solution really confuses more then it helps. IMO the bast way is
one getImpl() and the appropriate code everywhere using it.
> There was one final thing. In a lot of methods,
> you had if (getImpl() != null) which is always
> true. What I think you meant here is isConnected().
> I changed this, but please review.
Right.
> With this patch, my networking test now passes
> with the (linux,mingw) cross compiler, but I
> don't have a Linux native compiler to test with.
> (I could build one if you want.)
I'm only testing with Mauve. You should really put your tests into
Mauve to let other people share your work.
Michael