[EMAIL PROTECTED] wrote:
> Author: j16sdiz
> Date: 2008-10-08 08:40:14 +0000 (Wed, 08 Oct 2008)
> New Revision: 22965
>
> Modified:
> trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
> Log:
> BZip2OutputStream may write negative int (bug #2653)
>
> java.io.{File,ByteArray}OutputStream accept negative number,
> no reason why not accept them here.
>
> Modified:
> trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
> ===================================================================
> ---
> trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
> 2008-10-08 05:19:57 UTC (rev 22964)
> +++
> trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
> 2008-10-08 08:40:14 UTC (rev 22965)
> @@ -143,8 +143,8 @@
> if(closed) throw new IOException("Already closed!");
> if(streamNumber != lastOutputStream)
> throw new IllegalStateException("Writing to old
> stream in "+getName());
> - if((b < 0) || (b > 255))
> - throw new IllegalArgumentException();
> + //if((b < 0) || (b > 255))
> + // throw new IllegalArgumentException();
> int toWrite = pcfb.encipher(b);
> synchronized(PaddedEphemerallyEncryptedBucket.this) {
> out.write(toWrite);
I suggest you create a regression test for this bug and other bucket types.
_______________________________________________
Devl mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl