On Thu, 26 Oct 2023 18:16:26 GMT, Andy Goryachev <[email protected]> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Optimization
>
> modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 817:
>
>> 815: ComponentOrientation cor = this.getComponentOrientation();
>> 816: if (!cor.equals(ComponentOrientation.UNKNOWN)) {
>> 817:
>> getScene().setNodeOrientation(cor.equals(ComponentOrientation.RIGHT_TO_LEFT)
>> ?
>
> 1. I think getScene() might return null (sorry, did not see this immediately)
> 2. if possible, could we try limit code to one statement per line, i.e.
>
>
> Scene scene = getScene(); // it's a volatile, so better assign to a variable
> if(scene != null) {
> boolean rtl = cor.equals();
> scene.setNodeOrientation(rtl ? ...);
> }
ok..updated..
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1271#discussion_r1374027490