RFR: 8285452: Support new API to replace a file content using FileUtils.java [v3]

Roger Riggs rriggs at openjdk.java.net
Wed Apr 27 13:45:51 UTC 2022


On Fri, 22 Apr 2022 14:35:14 GMT, Sibabrata Sahoo <ssahoo at openjdk.org> wrote:

>> A new API to support replacing selective lines with desired content.
>
> Sibabrata Sahoo has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update FileUtils.java

If it is just for one/few tests, it would fit better in the directory with the test or in the test itself.
This doesn't seem like enough of a general purpose function to be in the test library.

Overwriting the input file seems like a bad choice, it will be a trap for someone.
It prevents the use of the function in a case where the output is written to a different file.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8360


More information about the core-libs-dev mailing list