Author: toad
Date: 2009-03-11 20:19:20 +0000 (Wed, 11 Mar 2009)
New Revision: 26000
Modified:
branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
Persistent hashCode for SplitHandler's
Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
2009-03-11 20:17:07 UTC (rev 25999)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
2009-03-11 20:19:20 UTC (rev 26000)
@@ -484,6 +484,15 @@
boolean metaInsertStarted;
boolean metaFetchable;
final boolean persistent;
+
+ // A persistent hashCode is helpful in debugging, and also
means we can put
+ // these objects into sets etc when we need to.
+
+ private final int hashCode;
+
+ public int hashCode() {
+ return hashCode;
+ }
/**
* Create a SplitHandler from a stored progress SimpleFieldSet.
@@ -547,6 +556,7 @@
public SplitHandler() {
// Default constructor
this.persistent = SingleFileInserter.this.persistent;
+ this.hashCode = super.hashCode();
}
public synchronized void onTransition(ClientPutState oldState,
ClientPutState newState, ObjectContainer container) {
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs