RFR: 8285452: Support new API to replace a file content using FileUtils.java [v2]
Daniel Fuchs
dfuchs at openjdk.java.net
Fri Apr 22 13:13:37 UTC 2022
On Fri, 22 Apr 2022 12:36:15 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
test/lib/jdk/test/lib/util/FileUtils.java line 381:
> 379:
> 380: public static void patch(Path path, int fromLine, int toLine, String to) throws IOException {
> 381: if(fromLine < 1 || toLine < 1) {
It would be good to add a proper API doc comment, especially regarding the meaning of the parameters, and whether the line in question is included/excluded. Also RuntimeException could be replaced with IndexOutOfBoundsException.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8360
More information about the core-libs-dev
mailing list