Author: david.lloyd(a)jboss.com
Date: 2008-03-26 23:27:49 -0400 (Wed, 26 Mar 2008)
New Revision: 3790
Modified:
remoting3/trunk/jrpp/src/main/java/org/jboss/cx/remoting/jrpp/mina/IoBufferByteMessageInput.java
Log:
If requested length is 0, return 0, even if nothing is left
Modified:
remoting3/trunk/jrpp/src/main/java/org/jboss/cx/remoting/jrpp/mina/IoBufferByteMessageInput.java
===================================================================
---
remoting3/trunk/jrpp/src/main/java/org/jboss/cx/remoting/jrpp/mina/IoBufferByteMessageInput.java 2008-03-27
01:21:27 UTC (rev 3789)
+++
remoting3/trunk/jrpp/src/main/java/org/jboss/cx/remoting/jrpp/mina/IoBufferByteMessageInput.java 2008-03-27
03:27:49 UTC (rev 3790)
@@ -23,6 +23,9 @@
}
public int read(byte[] data, int offs, int len) throws IOException {
+ if (len == 0) {
+ return 0;
+ }
if (! ioBuffer.hasRemaining()) {
return -1;
}
Show replies by date