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]

Re: some patches for 1.3 compatibility


Tony Kimball wrote:

> It would encourage
> contributors if they could file the required forms via the web -- and
> at least U.S. contributors, where digital signatures are binding,
> could close the whole loop in a matter of minutes.)

A good point, and I agree entirely! This is something that we should take up with the FSF.

> I see you need ChangeLog entries.  Here's one for this patch:

Thanks. However, that the format you used for the changelog isn't correct. You need to follow the convention
used in the existing ChangeLog file.

> : Where does all this EOF stuff come from? It is not present in the J2SE 1.3 documentation from Sun:
>
> It's all to support Socket.shutdownInput() and
> Socket.shutdownOutput(): Clients using the result of
> Socket.getInputStream() which call shutdownInput() get EOF semantics
> on the InputStream immediately thereafter in the 1.3 JDK, according to
> my test cases.  It could be done more elegantly I think, but this way
> one avoids adding a new implementation class, and the issue is small
> enough so that it's really down in the noise.

The problem here is that you have added new public and protected members to public parts of the API, like
java.io.InputStream, which are not part of the specification. We can't do that. Unfortunately, there is a
problem in that our implementation shares the FileInputStream and FileDescriptor classes between both the
socket and file io implementations. There is no way provided by the API to inform the InputStream of a
closed-for-reading condition. One possible fix would be to add dedicated
SocketInputStream/SocketOutputStream implementation classes.

Also, I don't see why the EOF checks need to be placed in unrelated stream classes, such as
BufferedInputStream? Can't this change be localized to whatever class is behind the implementation of
Socket.getInputStream()?

regards

  [ bryce ]



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