On Fri, 16 Feb 2024 12:38:02 GMT, Christoph Langer <[email protected]> wrote:
>> src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp
>> line 200:
>>
>>> 198: }
>>> 199:
>>> 200: if (colorData->bitsperpixel > 8) {
>>
>> So at this time, the code below will not be run if an error occurs. This may
>> lead to leaving the fields of `gpBitmapInfo` uninitialised.
>>
>> I'm unsure how critical it is⦠even though we're (presumably) on a headless
>> system.
>
> OK, yes, I'll turn this back to previous behavior. Rather don't touch
> something at all if we have no idea... π
I prefer *backing out*β¦ β it makes the code cleaner. At the same time, I am
unsure about the consequences of doing so. I could be safer to run the code
below, especially if you take into account that there's a fallback already:
https://github.com/openjdk/jdk/blob/fb90af881badf143163c7d0b9961152c2a12cd84/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp#L192-L199
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17614#discussion_r1492417059