-
Notifications
You must be signed in to change notification settings - Fork 61
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
refactor: Migrate Internal ProviderPersistence class to kotlin #533
base: blackout-2024
Are you sure you want to change the base?
refactor: Migrate Internal ProviderPersistence class to kotlin #533
Conversation
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.
Just those questions about locale, otherwise looks good to me.
private fun applyMacro(defaultString: String): String { | ||
var defaultString = defaultString | ||
if (!isEmpty(defaultString) && defaultString.startsWith("%")) { | ||
defaultString = defaultString.lowercase(Locale.getDefault()) |
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.
Are we sure we want to use the default locale here? I'm not saying we don't, but is this different in any way from the toLowerCase()
function in Java? Does getDefault()
get the current system default or some universal default? I've been bitten by locale bugs in the past, so I want to make sure we're 100% certain here.
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.
so here Locale.getDefault() will return the default language for system. languages where case rules vary (e.g., Turkish).
|
||
private fun generateAID(): String { | ||
var uuid = UUID.randomUUID().toString().replace("-", "") | ||
uuid = uuid.uppercase(Locale.getDefault()) |
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.
Same concern about locale here.
35ae7c8
to
38adc3c
Compare
f540bd1
to
d006811
Compare
Instructions
development
Summary
Testing Plan
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)