This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: remove all traces of java.io.FileDescriptor from java.net


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]