RFR: 6176679: Application freezes when copying an animated gif image to the system clipboard [v11]

Rajat Mahajan rmahajan at openjdk.org
Tue May 2 19:45:14 UTC 2023


On Tue, 2 May 2023 18:40:02 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Rajat Mahajan has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Update ImageRepresentation.java
>>    
>>    code cleanup
>>  - Update ImageRepresentation.java
>>    
>>    code cleanup
>>  -  update fix to work for both cases where image is displayed and not displayed
>
> src/java.desktop/share/classes/sun/awt/image/ImageRepresentation.java line 119:
> 
>> 117:                 while ((availinfo &
>> 118:                         (ImageObserver.ERROR | ImageObserver.FRAMEBITS)) == 0 &&
>> 119:                        missinginfo != 0)
> 
> In my opinion, such formatting looks confusing, keeping both ERROR and FRAMEBITS on the same line improves readability even though it doesn't fit 80-column limit.
> Suggestion:
> 
>                 while ((availinfo & (ImageObserver.ERROR | ImageObserver.FRAMEBITS)) == 0
>                        && missinginfo != 0) 
> 
> 
> Or alternatively, wrap `FRAMEBITS`:
> Suggestion:
> 
>                 while ((availinfo & (ImageObserver.ERROR
>                                      | ImageObserver.FRAMEBITS)) == 0
>                        && missinginfo != 0)

I agree the single line is one is more readable, was just following  the 80 column limit you told me before :-)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13414#discussion_r1182977651



More information about the client-libs-dev mailing list