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

Brian Burkhalter bpb at openjdk.java.net
Thu Apr 21 01:21:34 UTC 2022


On Fri, 1 Apr 2022 20:15:17 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Resurrection of the proposal to add a method to obtain the filename extension originated in PR [2319](https://github.com/openjdk/jdk/pull/2319).
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8057113: Fix variable name in @return verbiage

Commit 4adf810d060138e50d7ce2266e4299645149dd89 adds to `Path` the default methods `hasExtension()` and ` replaceExtension()`, and overrides of `replaceExtension()` using the native path representation in `UnixPath` and `ZipPath`. Unfortunately the latter override is entirely duplicative of the former for now. Note that `replaceExtension()` in fact has three capabilities: stripping the extension, appending an extension if none is already present, or actually replacing an extension.

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

PR: https://git.openjdk.java.net/jdk/pull/8066


More information about the nio-dev mailing list