Bug #8624
Stream should detect whether it is being used from the client or the server
0%
History
#1 Updated by Șerban Bursuc 17 days ago
Stream.java
is being used by both the server and the client, however some functions are OS dependent and this is not being accounted for.
writeNewLine
should append CRLF
if the target OS is Windows and LF
if the platform is Linux, however there is no such distinction.
In #8368 a fix was attempted by using ThinClient.isUnderWindows()
to check the platform however this is a client function which gets its value from the current session and it cannot be used.
I do not know any testcase where Stream
is being used from the server, but this is according to #8368-33.
#3 Updated by Greg Shah 17 days ago
Stream
is "dual mode" and is used as a base class for RemoteStream
which is used from converted code on the server as well as being used on the client side base class for FileStream
etc...
In addition, we have "server-side" file system support (see #4065) where we use the local file system at the server instead of calling over to the client.
I agree that we need to handle this newline non-sense (and platform knowledge) in a better way. It will likely affect Stream
and its subclasses.