RFR: 8339603: Seal the class hierarchy of Node, Camera, LightBase, Shape, Shape3D [v3]
Andy Goryachev
angorya at openjdk.org
Tue Oct 8 14:40:06 UTC 2024
On Tue, 8 Oct 2024 04:25:18 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/javafx/scene/CameraHelper.java line 60:
>>
>>> 58: @Override
>>> 59: protected NGNode createPeerImpl(Node node) {
>>> 60: throw new AssertionError();
>>
>> is this the right error type?
>> why change UnsupportedOperationException?
>
> 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?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1556#discussion_r1792009047
More information about the openjfx-dev
mailing list