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

Brian Burkhalter bpb at openjdk.java.net
Wed Mar 30 23:28:53 UTC 2022


On Fri, 29 Jan 2021 21:53:20 GMT, Roger Riggs <rriggs 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 10 additional commits since the last revision:
>> 
>>  - 8057113: Optimistically update @since tag to 18
>>  - Merge
>>  - 8057113: Change first sentence; change param name
>>  - 8057113: Change Path.getExtension() to accept a default return value in case the extension is indeterminate
>>  - 8057113: Tweak spec again, and @implSpec code
>>  - 8057113: Add @since tag
>>  - 8057113: Tweak first sentence of spec
>>  - 8057113: Handle getFileName() == null; revise spec
>>  - 8057113: Changes pursuant to PR conversation
>>  - 8057113: (fs) Path should have a method to obtain the filename extension
>
> src/java.base/share/classes/java/nio/file/Path.java line 267:
> 
>> 265:      *     filename.substring(filename.lastIndexOf('.') + 1);
>> 266:      * }</pre>
>> 267:      *
> 
> The Implspec fragment should be more complete. The preconditions in the prose are likely to be ignored by the reader.

Addressed by commit 7c3d0ff79ee11e6f1e567a21c6f23d3b3dc1c615.

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

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


More information about the nio-dev mailing list