RFR: 8057113: (fs) Path should have a method to obtain the filename extension [v19]
Alan Bateman
alanb at openjdk.org
Sun Oct 16 14:50:08 UTC 2022
On Fri, 14 Oct 2022 16:38: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 24 additional commits since the last revision:
>
> - 8057113: Revise specification and align default implementation and test with it
> - Merge
> - 8057113: Remove API note
> - 8057113: Change specification as suggested in review
> - 8057113: Update specification, implementation, and test
> - 8057113: Correct length 2 case; update test cases
> - 8057113: Revert return type back to a nullable-String; update test
> - Merge
> - 8057113: Remove extensions() test method; add threthree new test cases
> - 8057113: Revert excision of wild cards from imports
> - ... and 14 more: https://git.openjdk.org/jdk/compare/8fca5b62...104a7116
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" ?
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.
-------------
PR: https://git.openjdk.org/jdk/pull/8066
More information about the nio-dev
mailing list