Four letters can change the behaviour of a piece of code a lot

This commit is contained in:
Claudio Maggioni (maggicl) 2020-05-27 22:06:52 +02:00
parent f230bd8937
commit ea6f93d6f1
2 changed files with 2 additions and 4 deletions

View file

@ -148,7 +148,7 @@ public class DevicePropagationService {
}
if (causedByTrigger) {
endpoint.queueDeviceUpdate(device, user, false, user.getId(), false);
endpoint.queueDeviceUpdate(device, user, false, null, false);
}
}
}

View file

@ -210,9 +210,7 @@ public class DevicePropagationServiceTests {
doAnswer(i -> counter[0]++)
.when(endpoint)
.queueDeviceUpdate(d, guest, false, host.getId(), false);
doAnswer(i -> counter[0]++)
.when(endpoint)
.queueDeviceUpdate(d, host, false, host.getId(), false);
doAnswer(i -> counter[0]++).when(endpoint).queueDeviceUpdate(d, host, false, null, false);
devicePropagationService.propagateUpdateAsOwner(d, "host", false);
assertThat(counter[0]).isEqualTo(1);