Skip to content

Fix FileUtils getContentsAsString IOException handling - #650

Open
jiteshkhatri11 wants to merge 1 commit into
javapathfinder:masterfrom
jiteshkhatri11:fix-649-fileutils-ioexception
Open

jiteshkhatri11 wants to merge 1 commit into
javapathfinder:masterfrom
jiteshkhatri11:fix-649-fileutils-ioexception

Conversation

@jiteshkhatri11

Copy link
Copy Markdown

Summary

  • Throw an IOException when FileUtils.getContentsAsString(File) receives a null result from getContents(File), avoiding a NullPointerException.
  • Add regression tests for directory input and successful reading of a regular file.

Testing

  • gradlew.bat compileTestJava — passed.
  • gradlew.bat parallelTest — 1,034 passed, 0 failed, 0 skipped.
  • gradlew.bat test — the singleThreadTest task reported two failures in existing URLClassLoaderTest cases (testFindResources and testFindResource).

This branch has not been deployed

No deployments
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.

1 participant