Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
97ffe2fa
Commit
97ffe2fa
authored
Oct 11, 2014
by
Björn Richerzhagen
Browse files
Retrieval of lastKnownLocation now clones the position instance to
prevent unintended information spread
parent
0408fe7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/DefaultTopologyComponent.java
View file @
97ffe2fa
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment