Skip to content

Add explicit Charset to deprecated Apache FileUtils methods#125

Merged
timtebeek merged 2 commits intomainfrom
tim/fix-commons-text-lookup
Apr 11, 2026
Merged

Add explicit Charset to deprecated Apache FileUtils methods#125
timtebeek merged 2 commits intomainfrom
tim/fix-commons-text-lookup

Conversation

@timtebeek
Copy link
Copy Markdown
Member

@timtebeek timtebeek commented Apr 11, 2026

Summary

  • Adds Refaster templates to replace deprecated FileUtils methods that rely on platform default charset with versions that use StandardCharsets.UTF_8

  • Covers readFileToString(File), readLines(File), write(File, CharSequence), write(File, CharSequence, boolean), and writeStringToFile(File, String, boolean)

  • Closes Add explicit Charset to Apache FileUtils methods #36

Test plan

  • Updated existing ApacheCommonsFileUtilsTest to cover all new templates
  • Full test suite passes

@timtebeek timtebeek merged commit e9a07fd into main Apr 11, 2026
1 check passed
@timtebeek timtebeek deleted the tim/fix-commons-text-lookup branch April 11, 2026 20:32
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add explicit Charset to Apache FileUtils methods

1 participant