RFR: 4797982: Setting negative size of JSplitPane divider leads to unexpected results. [v4]

Phil Race prr at openjdk.org
Wed Jul 27 23:59:44 UTC 2022


On Wed, 27 Jul 2022 05:01:43 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/JSplitPane.java line 423:
>> 
>>> 421:      * @implNote Divider sizes < 1 are ignored.
>>> 422:      *           {@code SplitPane.dividerSize} L&F specific value
>>> 423:      *           will instead be used.
>> 
>> This isn't the same as ignoring it. Suppose we do
>> setDividerSize(5);
>> setDividerSize(-1);
>> 
>> what is the value after both of these - per your ignoring code 5, but per your doc it will be whatever the default was before you started to change it.
>> 
>> I think it sufficient to say it will be ignored and drop the 2nd clause.
>
> Ok. Modified javadoc and CSR

My apologies, but because I focused on the rest of it, I overlooked you had made this an implNote.
That seems odd. Do you really intend to imply that some other implementation of Java should be allowed
to do something with negative values ? If so that would be a compatibility issue ..

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

PR: https://git.openjdk.org/jdk/pull/9566



More information about the client-libs-dev mailing list