On 13/12/2016 21:18, Peter Levart wrote:
Adding to Peter's comment, this can be further changed to use Files.write(bob, srcData).I think this is OK. Just a couple of nits in test:1. You create a static Path bob = Paths.get("bob") field, but then you don't use it in:56 try (FileChannel fc = FileChannel.open(Paths.get("bob"), CREATE, WRITE)) {
Otherwise I think the patch looks okay although it does feel like invokeCleaner needs a warning in the javadoc, maybe being in Unsafe is enough.
-Alan