RFR: 8341372: BackgroundPosition, BorderImage, BorderStroke, CornerRadii should be final
Andy Goryachev
angorya at openjdk.org
Tue Oct 1 22:32:37 UTC 2024
On Tue, 1 Oct 2024 21:46:21 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
> Backgrounds and borders are comprised of immutable and final types. The following types are marked with the `final` modifier:
>
> * Background
> * BackgroundFill
> * BackgroundImage
> * BackgroundSize
> * Border
> * BorderWidths
>
> The following types are not marked with the `final` modifier:
>
> * BackgroundPosition
> * BorderImage
> * BorderStroke
> * CornerRadii
>
> This is probably just an oversight, as there is no value in allowing a subsection of these types to be extended.
There might be a very narrow use case (like debugging) when developer might need to extend to supply a custom `toString()` or some other method.
>From a high level design standpoint, I do agree with making these classes final.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1587#issuecomment-2387197329
More information about the openjfx-dev
mailing list