Reply To: Bug in the ReplicationDHTService

Home Forums PeerfactSim Forum Bug in the ReplicationDHTService Reply To: Bug in the ReplicationDHTService



To be more precise how I solved the problem:
In the constructor of the classes ReplicationOperation,
StoreReplicationMessage, ReplicationDHTObject and
KeepReplicationMessage I created a copy of the list of duplicate
Since StoreReplicationMessage and KeepReplicationMessage are message
classes it is obvious why the list should be copied. The list that is
passed to the ReplicationOperation upon creation needs to be copied
because otherwise it could be the same list as in a
ReplicationDHTObject (see handleNewRootMessage in the
ReplicationDHTService class). I although created a copy of the list in
the ReplicationDHTObject because the list should not be equal to the
list of the message. It is possible that the list of the message is
only passed on to the ReplicationDHTObject and therefore not copy
needs to be created, but I did not check this case.