On Thu, 15 Feb 2024 09:37:28 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> Christoph Langer has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Add comments
>
> src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp 
> line 184:
> 
>> 182:     VERIFY(hBMDC != NULL);
>> 183:     if (hBMDC == NULL)
>> 184:         return;
> 
> I believe `VERIFY` is redundant now because you explicitly verify `hBMDC` has 
> a valid value and back out if it doesn't.
> 
> I suggest using the braces even if not required.

VERIFY will bring assertions in debug builds which could be helpful. In opt 
builds they don't materialize, so I would like to keep this.

> src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp 
> line 190:
> 
>> 188:         VERIFY(::DeleteDC(hBMDC));
>> 189:         return;
>> 190:     }
> 
> The same goes here, `VERIFY(hBM != NULL);` is redundant, because the 
> following `if` handles the condition.

Same, I'd like to have the assertion in debug builds, though.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17614#discussion_r1491771276
PR Review Comment: https://git.openjdk.org/jdk/pull/17614#discussion_r1491771652

Reply via email to