Integrated: 8295298: Automate javax/swing/JFileChooser/FileViewNPETest.java

Alexey Ivanov aivanov at openjdk.org
Mon Oct 24 17:33:09 UTC 2022


On Thu, 20 Oct 2022 19:31:27 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> The automated test follows the instructions of the manual test that was added in #10485.
> 
> Instead of selecting the parent folder from the **Look in** combo box, it calls `setCurrentDirectory` directly with the parent of the path which is not traversable. Thus, the current directory of the file chooser is set to `null`.
> 
> As the second step, the test finds the combo box and re-selects the currently selected element. Without the fix for [JDK-6616245](https://bugs.openjdk.org/browse/JDK-6616245), `NullPointerException` is thrown and the test fails; with the fix applied, the original folder is selected and the test passes.
> 
> @mrserb and @TejeshR13, please, take a look.

This pull request has now been integrated.

Changeset: 68cf248b
Author:    Alexey Ivanov <aivanov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/68cf248b440a09c4d9bd16c862473f6a97cde279
Stats:     101 lines in 1 file changed: 55 ins; 22 del; 24 mod

8295298: Automate javax/swing/JFileChooser/FileViewNPETest.java

Reviewed-by: tr, serb

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

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



More information about the client-libs-dev mailing list