On Saturday 11 October 2008 06:45, Daniel Cheng wrote:
> On Wed, Oct 8, 2008 at 9:05 PM, Florent Daigniere
> <[EMAIL PROTECTED]> wrote:
> > [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.
> 
> I am trying to write some test case for buckets ...
> 
> Should the getOutputStream() method give a stream that _appends_ to the end?
> ArrayBucket appends, PaddedEphemerallyEncryptedBucket don't

ArrayBucket should not append.

Attachment: pgpS5BTkGa2U3.pgp
Description: PGP signature

_______________________________________________
Devl mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to