Author: toad
Date: 2008-01-28 18:51:48 +0000 (Mon, 28 Jan 2008)
New Revision: 17377

Modified:
   trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Throw on adding blocks to a cancelled subsegment.

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2008-01-28 18:47:09 UTC (rev 17376)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2008-01-28 18:51:48 UTC (rev 17377)
@@ -246,6 +246,8 @@
                if(blockNo < 0) throw new IllegalArgumentException();
                Integer i = new Integer(blockNo);
                synchronized(this) {
+                       if(cancelled)
+                               throw new IllegalStateException("Adding block 
"+blockNo+" to already cancelled "+this);
                        blockNums.add(i);
                        if(dontSchedule) return;
                        /**


Reply via email to