Skip to content

Handling null charset in FileUtils.readLines(File, Charset) - #744

Merged
garydgregory merged 1 commit into
apache:masterfrom
ryanmkurtz:patch-2
May 6, 2025
Merged

Handling null charset in FileUtils.readLines(File, Charset)#744
garydgregory merged 1 commit into
apache:masterfrom
ryanmkurtz:patch-2

Conversation

@ryanmkurtz

Copy link
Copy Markdown
Contributor

I recently upgraded to the latest commons-io and the code where we were passing in null Charsets blew up. The javadoc for this method says null should be handled, and this seems to be how you handle it elsewhere in the file.

@ryanmkurtz

ryanmkurtz commented May 5, 2025

Copy link
Copy Markdown
Contributor Author

The issue seems to have originated at dcb09db in version 2.12. We happened to upgrade from 2.11.

@garydgregory garydgregory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryanmkurtz
Thank you for the PR. Please add a unit test to avoid regressions in the future.

@ryanmkurtz

Copy link
Copy Markdown
Contributor Author

@garydgregory I added a new test.

@garydgregory
garydgregory merged commit a894c74 into apache:master May 6, 2025
@ryanmkurtz
ryanmkurtz deleted the patch-2 branch May 6, 2025 12:48
garydgregory added a commit that referenced this pull request May 6, 2025
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 this pull request may close these issues.

2 participants