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

Improve nullability handling. #101

Conversation

DivineThreepwood
Copy link
Member

  • Improve nullability handling in RPCClientImplTest, ExceptionProcessor, LabelProcessor, and TransformerCoreDefault

if (languageCode == LANGUAGE_CODE_TECHNICAL) {
getLabelByLanguage(languageCode, label)
} else getLabelByLanguage(Locale.forLanguageTag(languageCode).language, label)
fun getBestMatch(languageCode: String?, label: LabelType.LabelOrBuilder): String? = let {

Check warning

Code scanning / detekt

Excessive nesting leads to hidden complexity. Prefer extracting code to make it easier to understand.

Function getBestMatch is nested too deeply.
@DivineThreepwood DivineThreepwood merged commit c042bac into dev Apr 4, 2023
@DivineThreepwood DivineThreepwood deleted the 100-improve-nullability-handling-in-already-ported-kotlin-classes branch April 4, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Nullability handling in already ported kotlin classes.
2 participants