mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 10:56:53 +00:00
Simplify map-building logic
This commit is contained in:
1 parent
e333cbd94d
commit
c6bb649adb
1 file changed
+1
-3
+1
-3
@@ -44,9 +44,7 @@ public class AuthEnablementRefreshRequirementProvider implements WebsocketRefres
|
||||
|
||||
@VisibleForTesting
|
||||
Map<Long, Boolean> buildDevicesEnabledMap(final Account account) {
|
||||
return account.getDevices().stream()
|
||||
.collect(() -> new HashMap<>(account.getDevices().size()),
|
||||
(map, device) -> map.put(device.getId(), device.isEnabled()), HashMap::putAll);
|
||||
return account.getDevices().stream().collect(Collectors.toMap(Device::getId, Device::isEnabled));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user