Tolerate null UUID attribute values

This commit is contained in:
Jon Chambers
2021-11-09 11:00:27 -05:00
committed by GitHub
parent 3398955c1a
commit bae0196bcf
2 changed files with 7 additions and 1 deletions

View File

@@ -119,6 +119,6 @@ public class AttributeValues {
}
public static UUID getUUID(Map<String, AttributeValue> item, String key, UUID defaultValue) {
return AttributeValues.get(item, key).map(AttributeValues::toUUID).orElse(defaultValue);
return AttributeValues.get(item, key).filter(av -> av.b() != null).map(AttributeValues::toUUID).orElse(defaultValue);
}
}