On Thu, 2 May 2024 17:37:52 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Andy Goryachev has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 15 commits:
>> 
>>  - missing )
>>  - review comments
>>  - Merge branch 'master' into 8092102.truncated
>>  - add exports
>>  - added unit tests
>>  - Merge remote-tracking branch 'origin/master' into 8092102.truncated
>>  - test
>>  - Merge remote-tracking branch 'origin/master' into 8092102.truncated
>>  - Merge branch 'master' into 8092102.truncated
>>  - labeled helper
>>  - ... and 5 more: https://git.openjdk.org/jfx/compare/0eb4d719...aa28eb4e
>
> modules/javafx.controls/src/main/java/javafx/scene/control/Labeled.java line 
> 114:
> 
>> 112:      * by itself looks rather weird.
>> 113:      */
>> 114:     private static boolean useActualContentWidth;
> 
> Even given your comment about why it's safe to use a global variable, 
> wouldn't it be cleaner to make it an instance variable? I suppose it might be 
> OK to keep it global, but only if you can show that there are no issues with 
> reentrancy.

re-entrancy should not be an issue: the flag is used in the context of a single 
method which is always being called from an fx application thread.

I do not want to increase the memory footprint by making it an instance 
variable.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1389#discussion_r1588132322

Reply via email to