Do not use Strings for internal messages 10/37010/5
authorRobert Varga <rovarga@cisco.com>
Fri, 1 Apr 2016 14:14:25 +0000 (16:14 +0200)
committerRobert Varga <rovarga@cisco.com>
Sat, 2 Apr 2016 13:22:51 +0000 (15:22 +0200)
commit6313c088fc7db266cc25b691e0cd909300fc8425
tree4a00d445e3c2891543792477a1695c77ddd9909e
parentccc5a24cbbe04c4970c80568b7d155967b6c5629
Do not use Strings for internal messages

Using a String for the message identity has the effect of the equality
running on Strings, which has the effect that message is not really
isolated, but can be sent by anyone who knows the message content.

Instantiate simple Objects instead, which force a proper identity
equality check. Retain debuggability by having these instances override
toString().

Change-Id: Ia581e0a1e023ace10b5dbb81a44092ca04a4ff8f
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorSnapshotMessageSupport.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorServerConfigurationSupportTest.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipShardCommitCoordinator.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java