Author: toad
Date: 2008-07-31 12:43:17 +0000 (Thu, 31 Jul 2008)
New Revision: 21531

Modified:
   branches/db4o/freenet/src/freenet/support/SectoredRandomGrabArray.java
Log:
Fix repair code

Modified: branches/db4o/freenet/src/freenet/support/SectoredRandomGrabArray.java
===================================================================
--- branches/db4o/freenet/src/freenet/support/SectoredRandomGrabArray.java      
2008-07-31 12:42:53 UTC (rev 21530)
+++ branches/db4o/freenet/src/freenet/support/SectoredRandomGrabArray.java      
2008-07-31 12:43:17 UTC (rev 21531)
@@ -142,12 +142,12 @@
                                                if(grabArraysByClient.size() != 
1) {
                                                        Logger.error(this, 
"Grab arrays by client size should be 1 (since there is 1 non-null), but is 
"+grabArraysByClient.size());
                                                        
grabArraysByClient.clear();
-                                                       if(persistent) {
+                                                       if(persistent)
                                                                
container.activate(valid, 1);
-                                                               Object client = 
valid.getObject();
+                                                       Object client = 
valid.getObject();
+                                                       if(persistent)
                                                                
container.activate(client, 1);
-                                                               
grabArraysByClient.put(client, valid);
-                                                       }
+                                                       
grabArraysByClient.put(client, valid);
                                                }
                                                Logger.error(this, 
"grabArrays["+(1-x)+"] is valid but ["+x+"] is null, correcting...");
                                                grabArrays = new 
RemoveRandomWithObject[] { grabArrays[1-x] };


Reply via email to