RFR: 8282936: Write a regression test for JDK-4615365

Manukumar V S mvs at openjdk.java.net
Sun Mar 13 14:02:02 UTC 2022


Write a regression test for [JDK-4615365](https://bugs.openjdk.java.net/browse/JDK-4615365) : JSplitPane current and last divider positions incorrect when realized

Issue:
JSplitPane component with a left and right component has its current divider
position incorrectly set to -1 once it is fully realized. For JDK 1.3.1, its
value is set to 0. The current position of the divider should be the current
position of the divider once layout management is complete. If the divider is
moved one pixel, the current divider position is updated to the correct value
but the last divider position is then set to -1 (i.e. the last value of the
current divider position). If the divider is moved again, everything is OK.

Testing:
Java 1.4.0 -> Test Failed.
$ j2sdk1.4.0/bin/java bug4615365
current= -1, last= 0
Test Failed.

Java 1.4.1 -> Test Passed.
$ j2sdk1.4.1/bin/java bug4615365
current= 97, last= -1
Test Passed.

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

Commit messages:
 - 8282936: Write a regression test for JDK-4615365

Changes: https://git.openjdk.java.net/jdk/pull/7802/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7802&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8282936
  Stats: 183 lines in 1 file changed: 183 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7802.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7802/head:pull/7802

PR: https://git.openjdk.java.net/jdk/pull/7802



More information about the client-libs-dev mailing list