On Thu, 2 Nov 2023 19:15:42 GMT, Dean Long <[email protected]> wrote:

>> Julian Waters has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Changes awt_Frame.cpp
>
> src/java.desktop/windows/native/libawt/windows/awt_Canvas.cpp line 220:
> 
>> 218:     c = (AwtCanvas*) pData;
>> 219:     c->m_eraseBackground = doErase;
>> 220:     c->m_eraseBackgroundOnResize = doEraseOnResize;
> 
> Suggestion:
> 
>     {
>         AwtCanvas *c = (AwtCanvas*) pData;
>         c->m_eraseBackground = doErase;
>         c->m_eraseBackgroundOnResize = doEraseOnResize;
>     }
> 
> Does wrapping in {} work?  I think it looks better, and that's how we handle 
> case labels in switch statements, isn't it?

Wrapping it in a scope does work, but the problem is that it unfortunately 
becomes very messy and hard to review when the scope spans over a lot of lines 
(see below for instance, where I haven't switched from a scope to the split 
declaration and assignment yet). This approach was suggested by @djelinski in 
the review of https://github.com/openjdk/jdk/pull/15996

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1381110740

Reply via email to