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

Stuart Marks smarks at openjdk.org
Wed Aug 3 22:36:35 UTC 2022


On Mon, 1 Aug 2022 21:54:22 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 incrementally with one additional commit since the last revision:
> 
>   8057113: Remove API note

test/jdk/java/nio/file/Path/Extensions.java line 57:

> 55:             {"..a",            "a"},
> 56:             {"...a",           "a"},
> 57:             {"....a",          "a"},

The test cases on the above few lines need to be updated to conform to the "all leading dots" rule; they should all return null instead of "a".

test/jdk/java/nio/file/Path/Extensions.java line 61:

> 59:             {"...a.b",         "b"},
> 60:             {"...a.b.",        ""},
> 61:             {"..foo",          "foo"},

Also returns null to conform to "all leading dots ignored" rule.

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

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


More information about the nio-dev mailing list