Having a field of type Optional<Map<String, Object>> does not make sense to me,
When no data has been set, returning a empty Map instead of an empty Optional is far simpler and clearer.
Wrapping a Collection in an Optional is not considered as a good practice:
Having a field of type
Optional<Map<String, Object>>
does not make sense to me, When no data has been set, returning a empty Map instead of an empty Optional is far simpler and clearer. Wrapping a Collection in an Optional is not considered as a good practice:At least could you add helper methods like