Author: toad
Date: 2009-01-30 19:14:37 +0000 (Fri, 30 Jan 2009)
New Revision: 25412
Modified:
branches/db4o/freenet/src/freenet/support/io/BucketTools.java
Log:
Wierd paranoia
Modified: branches/db4o/freenet/src/freenet/support/io/BucketTools.java
===================================================================
--- branches/db4o/freenet/src/freenet/support/io/BucketTools.java
2009-01-30 18:57:20 UTC (rev 25411)
+++ branches/db4o/freenet/src/freenet/support/io/BucketTools.java
2009-01-30 19:14:37 UTC (rev 25412)
@@ -423,6 +423,8 @@
public static Bucket pad(Bucket oldBucket, int blockLength,
BucketFactory bf, int length) throws IOException {
byte[] hash = BucketTools.hash(oldBucket);
Bucket b = bf.makeBucket(blockLength);
+ if(b == null) // YES THIS HAS HAPPENED! FIXME
+ throw new NullPointerException("Bucket of length
"+blockLength+" returned from "+bf+" is null!");
MersenneTwister mt = new MersenneTwister(hash);
OutputStream os = b.getOutputStream();
try {
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs