Use String#equals instead of reference equality

This commit is contained in:
Jason Tedor 2015-11-11 12:47:55 -05:00
parent e4e68c0463
commit 3a92012938
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ public class TransportBroadcastByNodeActionTests extends ESTestCase {
ShardsIterator shardIt = clusterService.state().routingTable().allShards(new String[]{TEST_INDEX});
Set<String> set = new HashSet<>();
for (ShardRouting shard : shardIt.asUnordered()) {
if (shard.currentNodeId() != masterNode.id()) {
if (!shard.currentNodeId().equals(masterNode.id())) {
set.add(shard.currentNodeId());
}
}