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

false-negative: java.nio.file.Files.readString(Path) should trigger DM_DEFAULT_ENCODING #2114

Closed
matthiaskraaz opened this issue Jul 14, 2022 · 1 comment · Fixed by #2516

Comments

@matthiaskraaz
Copy link

The function java.nio.file.Files.readString(Path) is new since Java 11.

It uses the default charset and therefore should trigger DM_DEFAULT_ENCODING. It does not.

Tested with SpotBugs 4.7.1.

@welcome
Copy link

welcome bot commented Jul 14, 2022

Thanks for opening your first issue here! 😃
Please check our contributing guideline. Especially when you report a problem, make sure you share a Minimal, Complete, and Verifiable example to reproduce it in this issue.

hazendaz added a commit that referenced this issue Aug 15, 2023
…2516)

fixes #2114

Co-authored-by: Jeremy Landis <jeremylandis@hotmail.com>
gtoison added a commit to gtoison/spotbugs that referenced this issue Oct 16, 2023
Contrary to what was repored in spotbugs#2114 and as noted in spotbugs#2634, methods
added in JDK 11 are using UTF-8 (not the default charset)
iloveeclipse pushed a commit that referenced this issue Oct 16, 2023
Contrary to what was repored in #2114 and as noted in #2634, methods
added in JDK 11 are using UTF-8 (not the default charset)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant