RFR: 8308780: Fix the Java Integer types on Windows [v9]

Alexey Ivanov aivanov at openjdk.org
Thu Jun 22 20:08:12 UTC 2023


On Thu, 22 Jun 2023 19:33:17 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Revert "GetDIBits should take an LPVOID"
>>   
>>   This reverts commit 7dbe5dea84b1afb2235b66da581bcd3c1da4d6ac.
>
> src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1084:
> 
>> 1082: 
>> 1083:             jint *colorBits = nullptr;
>> 1084:             int *maskBits = nullptr;
> 
> Suggestion:
> 
>             jint *colorBits = NULL;
>             int *maskBits = NULL;
> 
> I'd rather keep `NULL` — it's used consistently inside `_Win32ShellFolder2_getIconBits` function as well as through the file, so `nullptr` is out of place.

The type of `colorBits` is `jint` because it's set to `iconBits` array, right?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14125#discussion_r1238952370


More information about the core-libs-dev mailing list