Author: nextgens
Date: 2008-06-22 02:33:05 +0000 (Sun, 22 Jun 2008)
New Revision: 20608
Modified:
trunk/freenet/src/freenet/support/io/BucketChainBucket.java
Log:
backport r20574 to trunk (Bugfix for straight-to-chain compression code)
Modified: trunk/freenet/src/freenet/support/io/BucketChainBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/io/BucketChainBucket.java 2008-06-22
02:26:04 UTC (rev 20607)
+++ trunk/freenet/src/freenet/support/io/BucketChainBucket.java 2008-06-22
02:33:05 UTC (rev 20608)
@@ -245,6 +245,9 @@
protected OutputStream makeBucketOutputStream(int i) throws IOException
{
Bucket bucket = bf.makeBucket(bucketSize);
+ buckets.add(bucket);
+ if(buckets.size() != i+1)
+ throw new IllegalStateException("Added bucket, size
should be "+(i+1)+" but is "+buckets.size());
buckets.set(i, bucket);
return bucket.getOutputStream();
}