could someone be so kind to give me some further e...
# detekt
p
could someone be so kind to give me some further explanation / examples, when using "implicit default locale" is a bad practice? (for rule ImplicitDefaultLocale)
It makes sense to me, to use specific locale for some data transfer (DTO). But I'm not completely sure, when it's a bad practice otherwise. I guess it's to use the default locale, when displaying some text on the UI?
e
If your code depends on system locale, then deploying into a new environment may cause unintended side-effects. Can happen if you move between on-premise servers and cloud, change how you package your application, etc. Not sure about android aspects of this.
p
I see. I guess same could apply for some business logic on frontend clients.
m
My view is that sometimes it is wrong to use the default locale and sometimes it is not. I'm guessing it is more often wrong on a server than on a client app. When you want to use the default locale, manually using it shows that it was an intentional decision and not something forgotten which might be a bug.
👍 1