Code review comment: Filter for what's not already in `hostInfos`?

Code under review:
private HostInfos getHostInfosFromZk(ApplicationInstanceReference application) {
        Map<HostName, HostInfo> hostInfos;
        String hostsRootPath = hostsPath(application);
        if (uncheck(() -> curator.framework().checkExists().forPath(hostsRootPath)) == null) {
            hostInfos = new HashMap<>();
        } else {
            List<String> hostnames = uncheck(() -> curator.framework().getChildren().forPath(hostsRootPath));
            hostInfos = new HashMap<>(hostnames.stream().collect(Collectors.toMap(
                    hostname -> new HostName(hostname),
                    hostname -> {
                        byte[] bytes = uncheck(() -> curator.framework().getData().forPath(hostsRootPath + "/" + hostname));
                        return WireHostInfo.deserialize(bytes);
                    })));
        }

        
        
        
        
        
        Set<HostName> legacyHostsDown = hostsDownFor(application);
        Map<HostName, HostInfo> legacyHostInfos = legacyHostsDown.stream().collect(Collectors.toMap(
                hostname -> hostname,
                hostname -> {
                    Stat stat = uncheck(() -> curator.framework()
                            .checkExists()
                            .forPath(hostsAllowedDownPath(application) + "/" + hostname.s()));
                    return HostInfo.createSuspended(HostStatus.ALLOWED_TO_BE_DOWN, Instant.ofEpochMilli(stat.getCtime()));
                }
        ));

        hostInfos.putAll(legacyHostInfos);
        return new HostInfos(hostInfos);
    }

Line commented on: Map<HostName, HostInfo> legacyHostInfos = legacyHostsDown.stream().collect(Collectors.toMap(

Revised code:
private HostInfos getHostInfosFromZk(ApplicationInstanceReference application) {
        Map<HostName, HostInfo> hostInfos;
        String hostsRootPath = hostsPath(application);
        if (uncheck(() -> curator.framework().checkExists().forPath(hostsRootPath)) == null) {
            hostInfos = new HashMap<>();
        } else {
            List<String> hostnames = uncheck(() -> curator.framework().getChildren().forPath(hostsRootPath));
            hostInfos = new HashMap<>(hostnames.stream().collect(Collectors.toMap(
                    hostname -> new HostName(hostname),
                    hostname -> {
                        byte[] bytes = uncheck(() -> curator.framework().getData().forPath(hostsRootPath + "/" + hostname));
                        return WireHostInfo.deserialize(bytes);
                    })));
        }

        
        
        
        
        
        Set<HostName> legacyHostsDown = hostsDownFor(application);
        Map<HostName, HostInfo> legacyHostInfos = legacyHostsDown.stream()
                .filter(hostname -> !hostInfos.containsKey(hostname))
                .collect(Collectors.toMap(
                hostname -> hostname,
                hostname -> {
                    Stat stat = uncheck(() -> curator.framework()
                            .checkExists()
                            .forPath(hostsAllowedDownPath(application) + "/" + hostname.s()));
                    return HostInfo.createSuspended(HostStatus.ALLOWED_TO_BE_DOWN, Instant.ofEpochMilli(stat.getCtime()));
                }
        ));

        hostInfos.putAll(legacyHostInfos);
        return new HostInfos(hostInfos);
    }