Author: toad
Date: 2008-02-15 18:27:37 +0000 (Fri, 15 Feb 2008)
New Revision: 17958
Modified:
trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Logging to try to catch "Not cancelled but key 27 is null?! on
freenet.client.async.SplitFileFetcherSubSegment"
Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
2008-02-15 17:00:38 UTC (rev 17957)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
2008-02-15 18:27:37 UTC (rev 17958)
@@ -60,7 +60,17 @@
Logger.minor(this, "Segment is finishing when
getting key "+token+" on "+this);
return null;
}
- return segment.getBlockKey(((Integer)token).intValue());
+ ClientKey key =
segment.getBlockKey(((Integer)token).intValue());
+ if(key == null) {
+ if(segment.isFinished()) {
+ Logger.error(this, "Segment finished but didn't
tell us! "+this);
+ } else if(segment.isFinishing()) {
+ Logger.error(this, "Segment finishing but
didn't tell us! "+this);
+ } else {
+ Logger.error(this, "Segment not finishing yet
still returns null for getKey()!: "+token+" for "+this);
+ }
+ }
+ return key;
}
public synchronized Object[] allKeys() {