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

Brian Burkhalter bpb at openjdk.org
Mon Oct 17 16:24:22 UTC 2022


On Sun, 16 Oct 2022 14:46:09 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> 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/2a2cfaa7...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" ?

That sounds reasonable.

> 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.

It is.

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

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


More information about the nio-dev mailing list