RFR: 8282789: Create a regression test for the JTree usecase of JDK-4618767 [v2]

Manukumar V S mvs at openjdk.java.net
Wed Mar 16 16:25:25 UTC 2022


> Create a regression test for the JTree usecase of [JDK-4618767](https://bugs.openjdk.java.net/browse/JDK-4618767)
> Context: Migrating tests from a closed tonga based test suite to open regression based one.
> 
> Issue identified in [JDK-4618767](https://bugs.openjdk.java.net/browse/JDK-4618767):
> Typing a letter while a JTree has focus now makes the selection jump to the first/next node/item whose text starts with that letter even though that letter is accompanied by modifier keys such as ALT or CTRL.
> 
> Fix:
> Only enable JTree letter navigation when the user doesn't press any modifier keys such as ALT or CTRL.
> 
> Testing:
> Java 1.4.0 -> Test Failed.
> $ ./j2sdk1.4.0/bin/java JTreeOld
> LookAndFeel: javax.swing.plaf.metal.MetalLookAndFeel
> OS = windows nt (unknown)
> java.lang.RuntimeException: Test Failed, expected colors, but got food
>         at JTreeOld.doTest(JTreeOld.java:166)
>         at JTreeOld.main(JTreeOld.java:32)
> Exception in thread "main"
> 
> Java 1.4.1 -> Test Passed.
> $ ./j2sdk1.4.1/bin/java JTreeOld
> LookAndFeel: javax.swing.plaf.metal.MetalLookAndFeel
> OS = windows nt (unknown)
> Test passed javax.swing.plaf.metal.MetalLookAndFeel
> LookAndFeel: com.sun.java.swing.plaf.motif.MotifLookAndFeel
> OS = windows nt (unknown)
> Test passed com.sun.java.swing.plaf.motif.MotifLookAndFeel
> LookAndFeel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
> OS = windows nt (unknown)
> Test passed com.sun.java.swing.plaf.windows.WindowsLookAndFeel

Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:

  Review comments fixed: Removed (int) casting and directly used variables x,y

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7742/files
  - new: https://git.openjdk.java.net/jdk/pull/7742/files/95c3640b..3c558772

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7742&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7742&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7742.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7742/head:pull/7742

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



More information about the client-libs-dev mailing list