RFR: 8057113: (fs) Path should have a method to obtain the filename extension [v19]

Brian Burkhalter bpb at openjdk.org
Mon Oct 17 17:12:10 UTC 2022


On Mon, 17 Oct 2022 16:21:50 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/share/classes/java/nio/file/Path.java line 253:
>> 
>>> 251: 
>>> 252:     /**
>>> 253:      * Returns the file name extension of this path as a {@code String}.
>> 
>> The latest proposal looks good but I wonder if we can improve on "Returns the file name extension of this path".  What would you think of "Returns the file extension of this path's file name" ?
>
> That sounds reasonable.

So changed in 66cb4a42b15b2db0427125e404684060b59b6f39.

>> test/jdk/java/nio/file/Path/Extensions.java line 25:
>> 
>>> 23: 
>>> 24: import java.nio.file.Path;
>>> 25: import java.util.Arrays;
>> 
>> I think the import of Arrays is left over from a previous iteration.
>
> It is.

Removed in 66cb4a42b15b2db0427125e404684060b59b6f39.

-------------

PR: https://git.openjdk.org/jdk/pull/8066


More information about the nio-dev mailing list