-
Notifications
You must be signed in to change notification settings - Fork 67
refactor: Migrate Internal Config class to kotlin #538
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
base: blackout-2024
Are you sure you want to change the base?
refactor: Migrate Internal Config class to kotlin #538
Conversation
35ae7c8
to
38adc3c
Compare
5de2f41
to
3a5292e
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.
Couple of questions, otherwise looks good
android-core/src/main/kotlin/com/mparticle/internal/ConfigManager.kt
Outdated
Show resolved
Hide resolved
open val apiKey: String | ||
get() = sPreferences?.getString(Constants.PrefKeys.API_KEY, null) ?: "" | ||
|
||
open val apiSecret: String | ||
get() = sPreferences?.getString(Constants.PrefKeys.API_SECRET, null) ?: "" |
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 notice in the original Java we return null for both of these if it's not stored. Should these properties be nullable and return null instead of an empty string? Are there any null checks in other places that assume this can return null?
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.
it is returning null it breaking lot's of existing code and test cases so decide to keep this as non null
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.
LGTM but would appreciate another set of eyes to take a look
Instructions
development
Summary
Testing Plan
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)