Author kevinmcmurtrie
Recipients fwierzbicki, kevinmcmurtrie
Date 2012-08-28.21:33:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
InputStream.available() must be at least capable of stating whether or not a non-blocking read is guaranteed.  The JVM impl in Jython 2.5.2 used available() as an optimization to possibly fill the buffer more.  If available() returned 0, it still worked in a possibly non-optimal manner.

If InputStream.available() is really broken in Tomcat, it may be better to work around the problem for only Tomcat.

ReadableByteChannel in= ... //custom Tomcat adaptor goes here
PyFile stdin= new PyFile(new StreamIO(in, true), "<stdin>", "r", 8192);

I'm actually using this to make 2.5.3 stdin work again.  What bothers me is that I don't yet know what other interactive streams (sockets?) are broken by the 2.5.3 change to StreamIO.
Date User Action Args
2012-08-28 21:33:28kevinmcmurtriesetmessageid: <>
2012-08-28 21:33:28kevinmcmurtriesetrecipients: + kevinmcmurtrie, fwierzbicki
2012-08-28 21:33:28kevinmcmurtrielinkissue1967 messages
2012-08-28 21:33:27kevinmcmurtriecreate