Author: toad
Date: 2008-12-17 19:36:15 +0000 (Wed, 17 Dec 2008)
New Revision: 24465

Modified:
   
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Similar trivial simplification


Modified: 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java  
    2008-12-17 19:34:10 UTC (rev 24464)
+++ 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java  
    2008-12-17 19:36:15 UTC (rev 24465)
@@ -203,17 +203,18 @@
                boolean retval = false;
                synchronized(segment) {
                        for(int i=0;i<10;i++) {
-                               Object ret;
+                               Integer ret;
                                int x;
                                if(blockNums.isEmpty()) {
                                        break;
                                }
                                x = context.random.nextInt(blockNums.size());
-                               ret = (Integer) blockNums.get(x);
-                               Key key = 
segment.getBlockNodeKey(((Integer)ret).intValue(), container);
+                               ret = blockNums.get(x);
+                               int block = ret;
+                               Key key = segment.getBlockNodeKey(block, 
container);
                                if(key == null) {
                                        if(segment.isFinishing(container) || 
segment.isFinished(container)) return false;
-                                       
if(segment.haveBlock(((Integer)ret).intValue(), container))
+                                       if(segment.haveBlock(block, container))
                                                Logger.error(this, "Already 
have block "+ret+" but was in blockNums on "+this+" in hasValidKeys");
                                        else
                                                Logger.error(this, "Key is null 
for block "+ret+" for "+this+" in hasValidKeys");

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to