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

2022-04-22 Thread Daniel Fuchs
On Fri, 22 Apr 2022 12:36:15 GMT, Sibabrata Sahoo  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


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

2022-04-22 Thread Sibabrata Sahoo
> 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

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8360/files
  - new: https://git.openjdk.java.net/jdk/pull/8360/files/39fa164a..0ec01e0b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8360=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8360=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8360.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8360/head:pull/8360

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