Commit 97ffe2fa authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Retrieval of lastKnownLocation now clones the position instance to

prevent unintended information spread
parent 0408fe7f
......@@ -198,7 +198,11 @@ public class DefaultTopologyComponent implements TopologyComponent,
@Override
public Location getLastLocation() {
return position;
/*
* As we want to mimic real world behavior, the current position
* snapshot is cloned to prevent information propagation due to Java.
*/
return position.clone();
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment