Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some reliability (and maintainability) issues highlighted by Sonar #324

Merged
merged 5 commits into from
Dec 22, 2024

Conversation

MrHadiSatrio
Copy link
Owner

@MrHadiSatrio MrHadiSatrio commented Dec 22, 2024

What has changed

Small refactorings here and there.

Why it was changed

As these issues regressed develop's Reliability score as shown in the Sonar dashboard.

Use Map#getValue() for querying maps which would throw a clearer exception
(i.e., NoSuchElementException) in case the element is not present.
Replaces usages of Ktor's IOException with KotlinX's as the former has
been deprecated.
An interface that declares only a single function should be marked as function
interface. Function interfaces can be instantiated from lambda expressions
directly and are, therefore, more comfortable to use.
Clarify that we are intentionally leaving these overrides blank to
avoid confusion.
Extract repeating checks for the forgotten state to keep things dry.
@MrHadiSatrio MrHadiSatrio merged commit 722295b into develop Dec 22, 2024
3 checks passed
@MrHadiSatrio MrHadiSatrio deleted the fix/reliability branch December 22, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant