-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
ImplicitDefaultLocale
rule should not check for deprecated functions
#6343
Comments
Hi, @marschwar should this rule be updated to handle Or is an action item of this issue is to remove this rule? |
TBH I wondered the same thing and hoped this would start a discussion. I am not entirely sure if the problem this rule addresses is still present with Locale.Root or not. |
if you see the doc of Root locale at https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#ROOT then you will find below doc(emphasis mine)
So to me, it seems that Locale.ROOT basically handles the original issue(my understanding of the original issue is that when using the old methods which use default JVM locale sometimes we end up getting some different capital or small letters based on the locale) |
I agree. We could either close this issue then or remove the |
I agree as this is now inherently handled by the newer methods. While the older methods are deprecated(and it's also been long since those methods are deprecated) |
ImplicitDefaultLocale
rule should check uppercase
instead of toUpperCase
ImplicitDefaultLocale
rule should not check for deprecated functions
I have updated the issue title and description. |
Which is the use case? You don't want to get the same issue twice? One by the compiler and the other by detekt? |
It is not about the deprecation warning. This rule currently checks, that those two deprecated methods are used correctly. How have we handled this in the past? Should we really check if deprecated methods are used correctly? |
I don't think we handled this in the past. TL;DR: I agree, we can remove the support for those two functions. |
Hello, I can propose a PR to do that if you like? If I understand correctly I just need to delete the check? |
toUpperCase and toLowerCase are deprecated, the ImplicitDefaultLocale should not check usage for them anymore Closes detekt#6343
toUpperCase and toLowerCase are deprecated, the ImplicitDefaultLocale should not check usage for them anymore Closes detekt#6343
toUpperCase and toLowerCase are deprecated, the ImplicitDefaultLocale should not check usage for them anymore Closes detekt#6343
toUpperCase and toLowerCase are deprecated, the ImplicitDefaultLocale should not check usage for them anymore Closes detekt#6343
…etekt#6548) toUpperCase and toLowerCase are deprecated, the ImplicitDefaultLocale should not check usage for them anymore Closes detekt#6343
Expected Behavior of the rule
The
ImplicitDefaultLocale
rule should not check for usage oftoUpperCase
andtoLowerCase
.Context
The extension functions
String.toUpperCase
andString.toLowerCase
have been deprecated in favor ofuppercase
andlowercase
. Both function by default use theLocale.ROOT
and make the check obsoleteThe text was updated successfully, but these errors were encountered: