Hi Shura,

 

Yes, I will prepare a parallel fix to Jemmy code-tools repo once we send the 
OpenJDK fix for commit.

 

Best Regards,

Vikrant

 

From: Alexandre (Shura) Iline 
Sent: Thursday, July 13, 2017 8:51 PM
To: Vikrant Agarwal
Cc: swing-dev@openjdk.java.net; Sergey Bylokhov; Semyon Sadetsky; Srinivas 
Mandalika; Muneer Kolarkunnu
Subject: Re: <Swing Dev> [10] RFR JDK-8184272 : Jemmy 
JFileChooserOperator.enterSubDir does not navigate to sub directory

 

Will you be preparing a parallel fix to the Jemmy code-tools repo?

 

Shura

 

On Jul 13, 2017, at 2:50 AM, Vikrant Agarwal <HYPERLINK 
"mailto:vikrant.v.agar...@oracle.com"vikrant.v.agar...@oracle.com> wrote:

 

Hi All,

Please review the following:

 

Bug : HYPERLINK "https://bugs.openjdk.java.net/browse/JDK-8184272"JDK-8184272

 

JDK 10 Webrev: http://cr.openjdk.java.net/~vagarwal/8184272/webrev.00/

 

Summary: 

Jemmy JFileChooserOperator.enterSubDir does not navigate to sub directory and 
instead goes to user's default directory

 

The present code for JFileChooserOperator.enterSubDir(..) first selects the 
directory, then tries to navigate to the selected directory by getting the path 
of selected directory from getSelectedFile().

JFileChooserOperator.getSelectedFile() calls JFileChooser.getSelectedFile(), 
which returns the path for the selected file, but if the selection is a 
directory, then it returns Null if the fileSelectionMode is not set to select 
directory. 
This when passed to setCurrentDirectory() sets the diectory as user's default 
directory.

 

Doing setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES) ensures that the 
getSelectedFile() returns the correct path even in case it is a directory.

Best Regards,

Vikrant

 

Reply via email to