Merge "Speed up ClusterWrapperImpl"
authorMoiz Raja <moraja@cisco.com>
Sun, 25 Jan 2015 20:11:17 +0000 (20:11 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Sun, 25 Jan 2015 20:11:18 +0000 (20:11 +0000)
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ClusterWrapperImpl.java

index 4edd60a33af436fff36e77627657d2cd7844a6c3..d7bfae1b42b88a36be7a9e29124af53231111757 100644 (file)
@@ -32,9 +32,8 @@ public class ClusterWrapperImpl implements ClusterWrapper {
                 "member-3 here would be the name of the member"
         );
 
-        currentMemberName = (String) cluster.getSelfRoles().toArray()[0];
+        currentMemberName = cluster.getSelfRoles().iterator().next();
         selfAddress = cluster.selfAddress();
-
     }
 
     public void subscribeToMemberEvents(ActorRef actorRef){