RFR: 8342782: AWTEventMulticaster throws StackOverflowError using AquaButtonUI [v5]

Laurent Bourgès lbourges at openjdk.org
Wed Dec 4 23:40:44 UTC 2024


On Sat, 23 Nov 2024 08:18:52 GMT, Laurent Bourgès <lbourges at openjdk.org> wrote:

>> src/java.desktop/share/classes/java/awt/AWTEventMulticaster.java line 991:
>> 
>>> 989:         while (true) {
>>> 990:             if (++level > 500)
>>> 991:                 return true;
>> 
>> our coding standards require that you always include the body in { .. }
>
> 500 is magic number ?
> I recommend using a constant explaining how this magic value has been determined empirically ?

Please move comments into the code (implementation details) instead of javadoc.

Do not mention '500' but say the rebalance threshold...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21962#discussion_r1855148909


More information about the client-libs-dev mailing list