On Wed, 2 Oct 2024 17:49:28 GMT, Andy Goryachev <[email protected]> wrote:
>> Michael Strauß has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> make fields private
>
> modules/javafx.graphics/src/main/java/javafx/scene/layout/Background.java
> line 316:
>
>> 314: final boolean b = fill.getRadii().hasPercentBasedRadii;
>> 315: hasPercentFillRadii |= b;
>> 316: if (fill.getFill().isOpaque()) {
>
> it was probably ok to leave some fields as package protected: I don't
> actually know if the compiler replaces the getFill() function call with
> direct access to the field.
>
> on the other hand, a public API is always a better choice.
Once the code is sufficiently often called, it will be optimized and
subsequently inline the call. It then becomes equivalent to a direct field
access.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1587#discussion_r1790398800