RFR 8057113: (fs) Path should have a method to test the filename extension
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Feb 16 16:48:45 UTC 2018
On Feb 16, 2018, at 6:26 AM, David Lloyd <david.lloyd at redhat.com> wrote:
> If lastDot is 0 or all the characters preceding lastDot are '.' then
> "" should be returned as well; this for example will not only return
> wrong results for ".." but also e.g. ".vimrc".
You are correct about “.vimrc” but the other cases appear to pass (expected result in the test is “” for these four cases):
. -> .
test getExtension
Expected: true
Actual: true
..... -> .....
test getExtension
Expected: true
Actual: true
.. -> ..
test getExtension
Expected: true
Actual: true
.vimrc -> .vimrc
test getExtension
Expected: true
Actual: false
Looks at least as if “” should be returned if the only dot in getFileName() is the first character.
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180216/f471bc93/attachment.html>
More information about the nio-dev
mailing list