* Matthew Toseland <[EMAIL PROTECTED]> [2008-08-22 14:29:52]: > On Sunday 17 August 2008 19:24, [EMAIL PROTECTED] wrote: > > Author: nextgens > > Date: 2008-08-17 18:24:10 +0000 (Sun, 17 Aug 2008) > > New Revision: 21976 > > > > Added: > > trunk/freenet/src/freenet/support/io/MockInputStream.java > > Modified: > > trunk/freenet/test/freenet/support/io/LineReadingInputStreamTest.java > > Log: > > bug #2501: fix the test > > > > Added: trunk/freenet/src/freenet/support/io/MockInputStream.java > > =================================================================== > > --- trunk/freenet/src/freenet/support/io/MockInputStream.java > > > (rev 0) > > +++ trunk/freenet/src/freenet/support/io/MockInputStream.java > > 2008-08-17 > 18:24:10 UTC (rev 21976) > > @@ -0,0 +1,20 @@ > > +/* This code is part of Freenet. It is distributed under the GNU General > > + * Public License, version 2 (or at your option any later version). See > > + * http://www.gnu.org/ for further details of the GPL. */ > > +package freenet.support.io; > > + > > +import java.io.InputStream; > > + > > +public class MockInputStream extends InputStream { > > + > > + public MockInputStream() { > > + } > > + > > + public int read() { > > + return -1; > > + } > > + > > + public int read(byte[] data, int offset, int len) { > > + return len; > > Return -1 here, surely?
No, it needs to be 0 if len is 0
signature.asc
Description: Digital signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
