groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keegan Witt <keeganw...@gmail.com>
Subject Re: Unexpected Path.write(text, charset) behavior
Date Wed, 19 Aug 2015 13:40:05 GMT
OK.  I felt like this was different than 7465 because it's more of a bug
rather than an inconsistency, but I hesitated on putting in 2.4.5 because
theoretically someone could be relying on the current behavior.  I opened
GROOVY-7553 <https://issues.apache.org/jira/browse/GROOVY-7553> for this.

-Keegan

On Wed, Aug 19, 2015 at 3:50 AM, Guillaume Laforge <glaforge@gmail.com>
wrote:

> +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