-
Notifications
You must be signed in to change notification settings - Fork 929
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
Check late property is isInitialized #5503
Conversation
12b4c61
to
7abcc09
Compare
@@ -130,9 +130,10 @@ class RealVoiceSearchActivityLauncher @Inject constructor( | |||
activity.window?.decorView?.rootView?.let { | |||
blurRenderer.addBlur(it) | |||
} | |||
val stringSource = if (this::_source.isInitialized) _source.paramValueName else "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly think we should just not make this variable lateinit
anymore. We should just make it Nullable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t remember much why I set this to lateinit before, but looking now, nothing is enforcing the order of the method calls, so we shouldn’t use lateinit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved it to be a nullable var
7abcc09
to
fe9b208
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing!!
Task/Issue URL: https://app.asana.com/0/1202552961248957/1209201227256746/f
Description
Ensure late property is init before using it
Steps to test this PR
NA, just code review