You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ba...@apache.org on 2006/12/27 01:39:39 UTC
svn commit: r490417 -
/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/util/CRLFDelimitedByteBuffer.java
Author: bago
Date: Tue Dec 26 16:39:38 2006
New Revision: 490417
URL: http://svn.apache.org/viewvc?view=rev&rev=490417
Log:
Forgot to apply the previous fix to the read() method
Modified:
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/util/CRLFDelimitedByteBuffer.java
Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/util/CRLFDelimitedByteBuffer.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/util/CRLFDelimitedByteBuffer.java?view=diff&rev=490417&r1=490416&r2=490417
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/util/CRLFDelimitedByteBuffer.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/util/CRLFDelimitedByteBuffer.java Tue Dec 26 16:39:38 2006
@@ -102,8 +102,8 @@
synchronized public byte[] read() throws IOException, LineLengthExceededException, TerminationException {
byte[] buffer = new byte[1000];
- while (isEmpty()) {
- int length = input.read(buffer);
+ int length;
+ while (lines.isEmpty() && isEmpty() && (length = input.read(buffer))!=-1) {
write(buffer, length);
}
return lines.isEmpty() ? null : ((Line) lines.remove(0)).getBytes();
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org