Skip to content

Commit

Permalink
Ignore null manifest records.
Browse files Browse the repository at this point in the history
  • Loading branch information
horrorho committed Aug 17, 2018
1 parent 6653042 commit 6fb08f3
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -117,6 +117,7 @@ static ProtectionZone zone(Collection<CloudKit.Record> records, ProtectionZone z
return responses
.stream()
.map(CloudKit.RecordRetrieveResponse::getRecord)
.filter(CloudKit.Record::hasRecordIdentifier)
.map(AssetsClient::manifestIDRecord)
.filter(Optional::isPresent)
.map(Optional::get)
Expand All @@ -129,7 +130,7 @@ static Optional<Map.Entry<ManifestID, CloudKit.Record>> manifestIDRecord(CloudKi
Optional<Map.Entry<ManifestID, CloudKit.Record>> entry = ManifestIDIndex.from(name)
.map(u -> new SimpleImmutableEntry<>(u.id(), record));
if (!entry.isPresent()) {
logger.warn("-- manifestIDRecord() - no manifest id found: {}", name);
logger.debug("-- manifestIDRecord() - no manifest id found: {}", record);
}
return entry;
}
Expand Down

0 comments on commit 6fb08f3

Please sign in to comment.