On Sunday 17 August 2008 19:24, nextgens at freenetproject.org 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? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20080822/b3710fa2/attachment.pgp>
