Skip to content
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

Improve messsages in the bundled signatures so they are actionable #220

Open
vlsi opened this issue Jan 19, 2023 · 1 comment
Open

Improve messsages in the bundled signatures so they are actionable #220

vlsi opened this issue Jan 19, 2023 · 1 comment

Comments

@vlsi
Copy link
Contributor

vlsi commented Jan 19, 2023

Here's jdk-unsafe:

@defaultMessage Uses default locale
java.lang.String#toLowerCase()
java.lang.String#toUpperCase()

I suggest adding the recommended action into the message.

@defaultMessage Use String#toLowerCase(Locale) to pass locale explicitly. For instance: .toLowerCase(Locale.ROOT)
java.lang.String#toLowerCase()
@defaultMessage Use String#toUpperCase(Locale) to pass locale explicitly. For instance: .toUpperCase(Locale.ROOT)
java.lang.String#toUpperCase()

An interesting case is

@defaultMessage Uses default locale or time zone
java.util.Calendar#<init>()

In fact, it uses both default locale and default timezone.
I added a timezone, rerun the check, and forbidden-apis was unhappy again on the same line, which was confusing for me for a couple of seconds.

WDYT?

@uschindler
Copy link
Member

We can improve the already existing signaturs files. I will release v9.5 first then we can improve this. It is mainly adding texts.

Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants