RFR 9: 8030090: (fs) Add default methods to Path for derived methods

Alan Bateman Alan.Bateman at oracle.com
Wed Dec 17 08:51:05 UTC 2014


On 16/12/2014 22:41, Brian Burkhalter wrote:
> Please review at your convenience.
>
> Issue:	https://bugs.openjdk.java.net/browse/JDK-8030090
> Patch:	http://cr.openjdk.java.net/~bpb/8030090/webrev.00/

This mostly looks good to me although I assumed that 
sun.nio.fs.AbstractPath would be removed. Is there any reason to keep it?

In the toFile() method then it should use == rather than equals as 
FileSystems.getDefault() returns the singleton that is the default 
provider. The UOE line is a bit long, might be best to try to get the 
line lengths consistent if you can.

In resolveSibling then a comma after "{@code other == null}" would make 
it read a bit better.

In the iterator method then I wonder if the @implSpec should be reduced 
down to a statement to specify that it just returns an Iterator to 
iterate over elements 0 to getNameCount()-1. One thing for the default 
implementation is that we don't need remove.

Formatting nit at L779-L780, you could move the @throws to the previous 
line or put the { on the next line.

A general comment is that you could use "this path" rather than "this 
{@code Path}" in each of the @implNotes if that looks better.

-Alan.


More information about the nio-dev mailing list