Handling null values for optional attributes of MarkProperties as

defined by the API docs
This commit is contained in:
Dennis Aulenbacher
2020-10-22 10:53:33 +02:00
parent f8700eab1d
commit a631ae7b88
@@ -107,7 +107,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
final String pattern = dbObject.getString(FieldNames.COMMON_MARK_PROPERTIES_PATTERN.name());
final String shape = dbObject.getString(FieldNames.COMMON_MARK_PROPERTIES_SHAPE.name());
final String type = dbObject.getString(FieldNames.COMMON_MARK_PROPERTIES_TYPE.name());
final MarkType markType = MarkType.valueOf(type);
final MarkType markType = type == null ? null : MarkType.valueOf(type);
final String storedColor = dbObject.getString(FieldNames.COMMON_MARK_PROPERTIES_COLOR.name());
final Color color = AbstractColor.getCssColor(storedColor);
final Document positionDocument = dbObject.get(FieldNames.MARK_PROPERTIES_FIXED_POSITION.name(), Document.class);