Author: robert
Date: 2008-01-23 16:28:00 +0000 (Wed, 23 Jan 2008)
New Revision: 17209

Modified:
   trunk/freenet/src/freenet/io/xfer/PartiallyReceivedBlock.java
Log:
sanity check


Modified: trunk/freenet/src/freenet/io/xfer/PartiallyReceivedBlock.java
===================================================================
--- trunk/freenet/src/freenet/io/xfer/PartiallyReceivedBlock.java       
2008-01-23 16:14:55 UTC (rev 17208)
+++ trunk/freenet/src/freenet/io/xfer/PartiallyReceivedBlock.java       
2008-01-23 16:28:00 UTC (rev 17209)
@@ -146,6 +146,9 @@
                if (_aborted) {
                        throw new AbortedException("PRB is aborted");
                }
+               if (!_received[x]) {
+                       throw new IllegalStateException("that packet is not 
received");
+               }
                return new Buffer(_data, x * _packetSize, _packetSize);
        }



Reply via email to