@Getter
Entity {
Status status;
}
@Getter
Status {
String value;
}
Entity e = repo.getEntity();
e.getStatus().getValue(); // if e.status == null then NPE exception
czy użycie Optional.ofNullable(e).map(Entity::getStatus).map(Status::getValue).orElse(null)
jest dopuszczalne?