On Saturday 11 October 2008 06:45, Daniel Cheng wrote:
> On Wed, Oct 8, 2008 at 9:05 PM, Florent Daigniere
> <nextgens at freenetproject.org> wrote:
> > j16sdiz at freenetproject.org 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20081014/c875c37a/attachment.pgp>

Reply via email to