dims 2002/06/07 09:12:21 Modified: java/src/org/apache/axis/transport/http NonBlockingBufferedInputStream.java Log: Strengthen the if conditions to avoid possible problems. Revision Changes Path 1.9 +2 -2 xml-axis/java/src/org/apache/axis/transport/http/NonBlockingBufferedInputStream.java Index: NonBlockingBufferedInputStream.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/NonBlockingBufferedInputStream.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- NonBlockingBufferedInputStream.java 1 May 2002 18:40:47 -0000 1.8 +++ NonBlockingBufferedInputStream.java 7 Jun 2002 16:12:20 -0000 1.9 @@ -99,13 +99,13 @@ * @return the byte read */ private void refillBuffer() throws IOException { - if (remainingContent == 0 || in == null) return; + if (remainingContent <= 0 || in == null) return; // determine number of bytes to read numbytes = in.available(); - if (numbytes <= 0) numbytes = 1; if (numbytes > remainingContent) numbytes=remainingContent; if (numbytes > buffer.length) numbytes=buffer.length; + if (numbytes <= 0) numbytes = 1; // actually attempt to read those bytes numbytes = in.read(buffer, 0, numbytes);