RFR: 8298318: (fs) APIs for handling filename extensions [v4]

Brian Burkhalter bpb at openjdk.org
Thu Mar 7 18:32:56 UTC 2024


On Thu, 7 Mar 2024 16:45:58 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8298318: Remove vestigial trim() call and commented out methods
>
> src/java.base/share/classes/java/nio/file/Path.java line 308:
> 
>> 306: 
>> 307:     /**
>> 308:      * Returns a copy of this {@code Path} with the file name extension removed.
> 
> Perhaps just `Returns a Path for this Path with the file  name extension removed`.
> That preserves the ability to return `this` if there is no extension.

Perhaps this?

Returns a Path with the same sequence of elements as this Path, but with no extension.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16226#discussion_r1516633268


More information about the nio-dev mailing list