RFR: 8345261: Refactor the Dimension2D classes [v2]
Andy Goryachev
angorya at openjdk.org
Mon Jan 27 16:38:57 UTC 2025
On Sat, 25 Jan 2025 07:04:41 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
>> A small refactoring of the Dimension classes.
>>
>> * `com.sun.javafx.geom.Dimension` was removed and its uses were replaced by `com.sun.javafx.geom.Dimension2D`.
>> * `com.sun.javafx.geom.Dimension2D` became a record.
>> * `javafx.geometry.Dimension2D`: fields became `final`.
>>
>> I'm not sure we need the implementation class at all considering we are free to use the public one.
>
> Nir Lisker has updated the pull request incrementally with one additional commit since the last revision:
>
> Address review comments
modules/javafx.graphics/src/main/java/com/sun/javafx/geom/Dimension2Df.java line 34:
> 32: * @see javafx.geometry.Dimension2D Dimension2D - doubles
> 33: */
> 34: public record Dimension2Df(float width, float height) {}
is this class really needed?
Looks like it's only referenced from `Arc2D::setArc()` and `RectanglularShape::setFrame()`, as far as I can tell these two methods are never called.
Should all three be removed?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1653#discussion_r1930831658
More information about the openjfx-dev
mailing list