Hi.
In case of wrong setup a `cvs log` command may print nothing. This makes the 
LoggedDataInputStream#read() method in the Netbeans CVS client loop forever. 
See this SO
question for details:
https://stackoverflow.com/questions/48741854/inputstream-wrapper-with-actual-read-in-a-dedicated-thread

There's a bug mentioning sleep() inside LoggedDataInputStream: 
https://netbeans.org/bugzilla/show_bug.cgi?id=254761

There are two types of input streams the LoggedDataInputStream works with. If 
it's a server connection, the stream is a SocketInputStream. If it's a local 
connection, the
stream is a read side of a pipe returned by Process.getInputStream().

I suppose that we want to keep the Thread.interrupted() check in 
LoggedDataInputStream, but using available() is definitely not the right way to 
check for premature EOF.
I also suppose that we want to keep the java 6 level.

I want to but remove the sleep() and available() calls from 
LoggedDataInputStream and instead catch the SocketTimeoutException and check 
the interrupted status on a timeout.

In case of a socket we will set the socket timeout to 100ms.
In case of a pipe we will perform reading in a dedicated thread. See the SO 
question above.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to