Skip to content

Conversation

@staudtMarius
Copy link
Member

Resolves #828

@staudtMarius staudtMarius added the code quality Code readability or structure is improved label Nov 20, 2023
@staudtMarius staudtMarius self-assigned this Nov 20, 2023
Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, upon inspection, I now understand the purpose of safeMapGet. It's only used in creating warning messages, where we do not want to fail if a value is missing (I guess this is also why you sometimes used getOrDefault as a replacement).

I now think it's best if we keep everything as it is, execpt placing a warning within JavaDoc above safeMapGet: It should only be used for building warning messages, and unintended results can be expected if used in other contexts.

…le-`EntitySource.safeMapGet`

# Conflicts:
#	CHANGELOG.md
@sebastian-peter sebastian-peter changed the title Throwing exception instead of using safeMapGet. JavaDoc cautionary hint for safeMapGet. Nov 28, 2023
Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sebastian-peter sebastian-peter merged commit 8b8725b into dev Nov 28, 2023
@sebastian-peter sebastian-peter deleted the ms/#828-throw-exception-instead-of-questionable-`EntitySource.safeMapGet` branch November 28, 2023 10:56
@sebastian-peter sebastian-peter added this to the Version 4.2 milestone Nov 28, 2023
@sebastian-peter sebastian-peter modified the milestones: Version 4.2, Version 5.0 Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality Code readability or structure is improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Throw exception instead of questionable EntitySource.safeMapGet

3 participants