Yuta HIGUCHI

bugfix: DeviceManager#applyRole should ignore NONE

Change-Id: Ib235c4853b0a7e504a8ee42e9bc9eafe99257fc8
......@@ -144,7 +144,7 @@ public class DeviceManager
// Applies the specified role to the device; ignores NONE
private void applyRole(DeviceId deviceId, MastershipRole newRole) {
if (newRole.equals(MastershipRole.NONE)) {
if (!newRole.equals(MastershipRole.NONE)) {
Device device = store.getDevice(deviceId);
// FIXME: Device might not be there yet. (eventual consistent)
if (device == null) {
......