RFR: JDK-8292866: Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation check MultiByteToWideChar return value for failures

Matthias Baesken mbaesken at openjdk.org
Fri Aug 26 07:54:25 UTC 2022


On Thu, 25 Aug 2022 08:02:00 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar
> states about MultiByteToWideChar : "The function returns 0 if it does not succeed" and lists a few failure cases.
> However we miss checking the failure case in Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation , seems we assume the function always works nicely (in most of the JDK coding the return value is checked ).

I adjusted the return syntax.

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

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



More information about the client-libs-dev mailing list