RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null [v2]
Alexey Ivanov
aivanov at openjdk.org
Tue Dec 24 12:59:41 UTC 2024
On Mon, 23 Dec 2024 20:31:30 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
> Do I retain or remove ` hIcon != 0L` check here ? Since now `hIcon != 0` is being checked before calling `mmakeIcon()`.
I'm for keeping it. Not calling a method is faster than calling it and returning immediately because a precondition isn't met. Plus, it makes it clear that we don't even try to create an icon from an invalid icon handle.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22776#discussion_r1896728866
More information about the client-libs-dev
mailing list