Re: RFR: 8285452: Add a new test library API to replace a file content using FileUtils.java [v4]
On Fri, 29 Apr 2022 10:36:50 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: > > 8285452: Add a new test library API to replace a file content using > FileUtils.java test/lib/jdk/test/lib/util/FileUtils.java line 396: > 394: removed += lines.remove(fromLine - 1).trim(); > 395: } > 396: var froms = > Arrays.asList(from.split(System.lineSeparator())).stream() How about just using `from.lines()`? - PR: https://git.openjdk.java.net/jdk/pull/8360
Re: RFR: 8285452: Add a new test library API to replace a file content using FileUtils.java [v4]
> 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: 8285452: Add a new test library API to replace a file content using FileUtils.java - Changes: - all: https://git.openjdk.java.net/jdk/pull/8360/files - new: https://git.openjdk.java.net/jdk/pull/8360/files/ef5dc31a..14125936 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=8360=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8360=02-03 Stats: 143 lines in 2 files changed: 140 ins; 1 del; 2 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