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

SpotlessExtension should make use of StandardCharsets in setEncoding #1128

Closed
x80486 opened this issue Feb 14, 2022 · 2 comments · Fixed by #1140
Closed

SpotlessExtension should make use of StandardCharsets in setEncoding #1128

x80486 opened this issue Feb 14, 2022 · 2 comments · Fixed by #1140

Comments

@x80486
Copy link
Contributor

x80486 commented Feb 14, 2022

Since with Java 7.x, StandardCharsets provides constants for common Charset objects.

Using the constants is less error prone, and can provide a small performance advantage compared to, for instance, Charset.forName/1 since no scan across the internal Charset caches is needed.

It would be great is SpotlessExtension.encoding can be changed/enhanced in that regard.

@nedtwigg
Copy link
Member

Happy to take a PR for this.

@x80486
Copy link
Contributor Author

x80486 commented Feb 14, 2022

I'll take it. I don't know much about this, but as far as I can tell it's just adding another method with the Charset type.

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

Successfully merging a pull request may close this issue.

2 participants