[9] RFR of 8139133: Changing the modification time on a unix domain socket file fails
Brian Burkhalter
brian.burkhalter at oracle.com
Wed Dec 9 01:03:57 UTC 2015
On Dec 8, 2015, at 5:11 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> Good, this is where I assumed it was going when we initially discussed this one back in October.
Here’s yet another iteration:
http://cr.openjdk.java.net/~bpb/8139133/webrev.05/
> One thing we could do to make this a bit clearer is for close to be a no-op when called with -1. I realize this requires renaming the native methods so not a big issue if you decide not to do it in this patch.
UnixNativeDispatcher modified accordingly.
> In setTimes then it might be a bit cleaner if you rename useFdToSetTimes to useFutimes.
So changed.
> The test is still a concern, esp. the sleep.
Excised the sleep calls. The existence of the socket file is determined instead by creating it in a new subdirectory of the test directory and monitoring the subdirectory for new entries using a WatchService. Don’t know whether this is the best way to handle it but it works.
> There are also a lot of catching of IOException that I assume should be removed to allow the test to fail.
The test would still fail as the IOEs were re-thrown but I’ve cleaned them up anyway as it does look less messy.
> Also the message "Failed to remove" isn't quite right as deleteIfExists returns false when the file does not exist. I think you can remove the try-catch around this can be removed too.
Done.
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20151208/913f828e/attachment-0001.html>
More information about the nio-dev
mailing list