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

Roger Riggs rriggs at openjdk.org
Fri Jul 1 15:38:50 UTC 2022


On Fri, 1 Jul 2022 15:22:54 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 14 additional commits since the last revision:
> 
>  - 8057113: Add class level apiNote; improve getExtension() specification; remove hasExtension() and replaceExtension()
>  - Merge
>  - 8057113: Change @since annotation to 20
>  - Merge
>  - 8057113: Remove superfluous new Object[] statements from test
>  - 8057113: Fix getExtension() commcents; improve hasExtension() implementation
>  - 8057113: trailing dot yields empty string extension; add test
>  - Merge
>  - 8057113: String getExtension(String defaultExtension) to Optional<String> getExtension() and other changes
>  - 8057113: Clean up trailing whitespace
>  - ... and 4 more: https://git.openjdk.org/jdk/compare/c0042581...d11ef42a

src/java.base/unix/classes/sun/nio/fs/UnixPath.java line 39:

> 37: import java.net.URI;
> 38: import java.util.Objects;
> 39: 

These can be reverted; no changes needed in UnixPath.

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

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


More information about the nio-dev mailing list