This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PATCH: remove all traces of java.io.FileDescriptor from java.net
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: Jeff Sturm <jsturm at one-point dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Mon, 25 Mar 2002 16:28:09 +1200
- Subject: Re: PATCH: remove all traces of java.io.FileDescriptor from java.net
- References: <Pine.LNX.4.10.10203242209100.16111-100000@mars.deadcafe.org>
Jeff Sturm wrote:
>Tested on i686-linux. OK for 3.1 branch and mainline?
>
>2002-03-24 Jeff Sturm <jsturm@one-point.com>
>
> * java/net/DatagramSocketImpl.java
> (java.io.FileDescriptor): Don't import.
> (fd): Remove instance variable.
> (getFileDescriptor): Remove method.
>
I don't think we can do that: both "fd" and getFileDescriptor() are part
of the API.
Probibly the "fnum" field in PlainSocketImpl should go away, not "fd".
I don't see how we could be getting premature finalization here. The
SocketInputStream and SocketOutputStream will both have a this$0 field
pointing to the PlainSocketImpl, which in turn has a reference to the
fd. Thus as long as the stream is alive the fd shouldn't be collected.
Can you verify that the bitmap GC descriptor for SocketInputStream is
correct?
regards
Bryce.