RFR: 4265389: JSplitPane does not support ComponentOrientation [v5]

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Jul 19 07:59:33 UTC 2024


On Fri, 19 Jul 2024 07:53:14 GMT, Tejesh R <tr at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Override setComponentOrientation
>
> src/java.desktop/share/classes/javax/swing/JSplitPane.java line 376:
> 
>> 374:         Component rightComponent = this.getRightComponent();
>> 375:         if (this.getComponentOrientation().equals(ComponentOrientation.RIGHT_TO_LEFT)) {
>> 376:             if (rightComponent != null) {
> 
> I hope `null` is redundant here, because it is handled inside `setRightComponent/setLeftComponent`. I don't see any difference with and without `null` check while testing in my local. Any particular reason for adding `null` check here?

Probably, but I kept it as it is similar to the constructor where it does a null check..

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20214#discussion_r1683973625


More information about the client-libs-dev mailing list