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

Brian Burkhalter bpb at openjdk.org
Tue Mar 12 23:03:15 UTC 2024


On Thu, 7 Mar 2024 22:46:06 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Add to `java.nio.file.Path` a method `getExtension` to retrieve the `Path`'s extension, and companion methods `removeExtension` and `addExtension`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8298318: corretions to commit 030a250aaf4c309d515507527932b233f210501e

Commit f66373e59318a26393a8efcd869344b3afeac14b makes these changes:

1. `getExtension`: The wording of the specification of what an extension is has been refined, hopefully for the better.
2. `withoutExtension`: The invariant described in the specification has been removed as being redundant with the invariant in the specification of `withExtension`.
3. The test has been updated to match the revised specification.

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

PR Comment: https://git.openjdk.org/jdk/pull/16226#issuecomment-1992713361


More information about the nio-dev mailing list