RFR: 8339603: Seal the class hierarchy of Node, Camera, LightBase, Shape, Shape3D [v3]
Kevin Rushforth
kcr at openjdk.org
Tue Oct 8 14:58:09 UTC 2024
On Tue, 8 Oct 2024 14:37:28 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> When `Camera` is sealed, this method cannot be called by user code. `UnsupportedOperationException` would be okay if it could reasonably be called, but this is now an invariant that would signal a bug in JavaFX.
>
> maybe an explanatory comment should be added?
We typically use `InternalError` for the case where there should be no possible reason for a particular case, but also use `AssertionError` in some cases. Either is OK with me. I agree that a comment to the affect of "Should not ever get here" wouldn't be a bad idea.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1556#discussion_r1792041603
More information about the openjfx-dev
mailing list