On Fri, 29 Apr 2022 18:28:45 GMT, Weijun Wang wrote:
>> Shouldn't the comparison be better implemented by the caller then, who will
>> know whether spaces are important or not? That's why I had suggested taking
>> a `Predicate` that could be called with each line removed, and the
>> caller cou
On Fri, 29 Apr 2022 14:19:40 GMT, Daniel Fuchs wrote:
>> The comparison is intentionally made lax so the caller does not need to
>> provide the exact indentation or even new line characters. We think along
>> with `fromLine` and `toLine` this is enough to make sure we are not
>> modifying the
On Fri, 29 Apr 2022 12:29:35 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: updated to use lines()
test/jdk/j
On Fri, 29 Apr 2022 13:02:06 GMT, Weijun Wang wrote:
>> Also calling trim() assumes that white spaces are not significant. This
>> might not be the case in the general case (for instance - think of markdown
>> files were leading spaces are significant).
>
> The comparison is intentionally made
On Fri, 29 Apr 2022 12:44:26 GMT, Daniel Fuchs wrote:
>> test/lib/jdk/test/lib/util/FileUtils.java line 394:
>>
>>> 392: var removed = "";
>>> 393: for (int i = fromLine; i <= toLine; i++) {
>>> 394: removed += lines.remove(fromLine - 1).trim();
>>
>> sho
On Fri, 29 Apr 2022 12:35:59 GMT, Daniel Fuchs wrote:
>> Sibabrata Sahoo has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8285452: updated to use lines()
>
> test/lib/jdk/test/lib/util/FileUtils.java line 394:
>
>> 392: var r
On Fri, 29 Apr 2022 12:29:35 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: updated to use lines()
test/lib/j
> 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: updated to use lines()
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8360/fil