Skip to content

Throw exception instead of questionable EntitySource.safeMapGet #828

Closed
@sebastian-peter

Description

@sebastian-peter

Once #773 is merged:

The whole procedure within EntitySource.safeMapGet seems somewhat questionable to me. We rather want to throw an exception if a required value does not exist, instead of returning some error message as a String in place of the desired value. For non-required values (if applicable), one can just handle the result of Optional.ofNullable(map.get(key)).

Originally mentioned by @sebastian-peter in #773 (comment)

Metadata

Metadata

Assignees

Labels

code qualityCode readability or structure is improved

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions