groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Laforge <glafo...@gmail.com>
Subject Re: Unexpected Path.write(text, charset) behavior
Date Wed, 19 Aug 2015 07:50:11 GMT
+1
Le 19 août 2015 09:21, "Paolo Di Tommaso" <paolo.ditommaso@gmail.com> a
écrit :

> I think it's a good idea.
>
>
> Cheers,
> Paolo
>
>
> On Tue, Aug 18, 2015 at 4:42 PM, Keegan Witt <keeganwitt@gmail.com> wrote:
>
>> So, I was working on GROOVY-7465
>> <https://issues.apache.org/jira/browse/GROOVY-7465> when I noticed
>> something peculiar.
>>
>> def p = java.nio.file.Paths.get("foo.txt")
>> p.write("1")
>> p.write("2")
>> assert p.text == "2"  // passes
>> java.nio.file.Files.delete(p)
>> p.write("1", "UTF-8")
>> p.write("2", "UTF-8")
>> assert p.text == "2"  // fails, is '12'
>> java.nio.file.Files.delete(p)
>>
>> While 7465 is targeting 2.5.0, I'm wondering if I should fix this in
>> 2.4.5?  If agreed, I'll open a separate Jira for this issue.
>>
>> -Keegan
>>
>
>

Mime
View raw message