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:15:36 UTC 2022


On Fri, 29 Jan 2021 22:10:16 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/share/classes/java/nio/file/Path.java line 258:
>> 
>>> 256:      * is returned.  This will occur if the file name has length less than two,
>>> 257:      * only the first character is a dot, or the last character is a dot.
>>> 258:      *
>> 
>> Add the case where there is no '.' to be explicit.
>
> Good point; will do.

Fixed by commit 7c3d0ff79ee11e6f1e567a21c6f23d3b3dc1c615.

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

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


More information about the nio-dev mailing list