Author: toad
Date: 2008-10-24 18:05:13 +0000 (Fri, 24 Oct 2008)
New Revision: 23088
Modified:
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
Log:
Get rid of the SoftReference. It doesn't gain us much, and complicates
profiling.
Modified:
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
2008-10-24 16:15:43 UTC (rev 23087)
+++ branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
2008-10-24 18:05:13 UTC (rev 23088)
@@ -4,7 +4,6 @@
package freenet.client.async;
import java.io.IOException;
-import java.lang.ref.SoftReference;
import java.net.MalformedURLException;
import java.util.Collections;
import java.util.List;
@@ -49,7 +48,6 @@
private final FailureCodeTracker errors;
private boolean finished;
private final boolean dontSendEncoded;
- private transient SoftReference refToClientKeyBlock;
final int token; // for e.g. splitfiles
private final Object tokenObject;
final boolean isMetadata;
@@ -127,13 +125,7 @@
ClientKeyBlock block;
boolean shouldSend;
synchronized(this) {
- if(refToClientKeyBlock != null) {
- block = (ClientKeyBlock)
refToClientKeyBlock.get();
- if(block != null) return block;
- }
block = innerEncode(context.random, container);
- refToClientKeyBlock =
- new SoftReference<ClientKeyBlock>(block);
shouldSend = (resultingURI == null);
resultingURI = block.getClientKey().getURI();
}