8205062: (fs) Improve some print diagnostics in java/nio/file/Files/CopyAndMove.java

Brian Burkhalter brian.burkhalter at oracle.com
Fri Jun 15 00:53:59 UTC 2018


Continued from http://mail.openjdk.java.net/pipermail/nio-dev/2018-June/005220.html.

New issue: https://bugs.openjdk.java.net/browse/JDK-8205062

On Jun 14, 2018, at 9:13 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:

> On Jun 14, 2018, at 9:06 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
>> The main method chooses the directory (or directories if possible) and I think that is the place to add the trace messages. I'd like to avoid the getFileStore as we've had so many issues with this hanging on specific machines (due to stale NFS mounts for example).

As it happens there were already getFileStore calls in there before these changes and I think they are inevitable. I have modified the main method to print the information for dir{1,2,3}.

>>> […]
>>> 
>> I hope you see my point that the catching of Exception in these methods is a bit ugly. If you really need to print out all the attributes then it can be done before the asserts.

I’ve added a second version of assertTrue which allows for printing the information while retaining the line number correlation between the exception and the assert method.

http://cr.openjdk.java.net/~bpb/8205062/webrev.00/

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180614/01b6d697/attachment.html>


More information about the nio-dev mailing list