8202076: test/jdk/java/io/File/WinSpecialFiles.java on windows with VS2017
Ivan Gerasimov
ivan.gerasimov at oracle.com
Fri May 18 23:49:42 UTC 2018
Thanks Brian, the last webrev looks good to me!
I minor suggestion is that I would recommend to use L'\\' to explicitly
indicate it is a wide char literal.
And the last comment: Maybe it makes sense to update the test
java/io/File/WinSpecialFiles.java to make sure we deal correctly with
wildcards in a file name (and that nobody will accidentally optimize
away the check of the filename).
With kind regards,
Ivan
On 5/18/18 3:08 PM, Brian Burkhalter wrote:
> Hi Ivan,
>
> On May 18, 2018, at 2:30 PM, Brian Burkhalter
> <brian.burkhalter at oracle.com <mailto:brian.burkhalter at oracle.com>> wrote:
>
>> On May 18, 2018, at 2:24 PM, Ivan Gerasimov
>> <ivan.gerasimov at oracle.com <mailto:ivan.gerasimov at oracle.com>> wrote:
>>
>>> In fact, we only need to check that that only file name (without the
>>> directory name) is the same, so maybe it will be safer to compare
>>> the substrings starting at the very last backslash?
>>> If the check fails, then we may want to try to see if pathbuf ends
>>> with fileData.cAlternateFileName.
>>
>> Indeed it might make more sense to locate the last backslash using
>> strrchr or equivalent and then do the comparison against the returned
>> pointers without a length.
>
> Here is another version which incorporates your suggestion:
>
> http://cr.openjdk.java.net/~bpb/8202076/webrev.02/
> <http://cr.openjdk.java.net/%7Ebpb/8202076/webrev.02/>
>
> Thanks,
>
> Brian
--
With kind regards,
Ivan Gerasimov
More information about the core-libs-dev
mailing list