groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keegan Witt <keeganw...@gmail.com>
Subject Unexpected Path.write(text, charset) behavior
Date Tue, 18 Aug 2015 14:42:50 GMT
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