<Swing Dev> [10][11][JDK-8194044] Regression manual Test javax/swing/JFileChooser/8067660/FileChooserTest.java fails
Prasanta Sadhukhan
prasanta.sadhukhan at oracle.com
Wed Jan 3 05:56:56 UTC 2018
Fix looks fine. But I guess, it is possible to add a automated
regression test to it utilising isFileSystemRoot().
Regards
Prasanta
On 1/2/2018 4:31 PM, Krishna Addepalli wrote:
>
> Hi All,
>
> Please review a fix for bug:
>
> Bug: JDK-8194044 : https://bugs.openjdk.java.net/browse/JDK-8194044
>
> Webrev: http://cr.openjdk.java.net/~kaddepalli/8194044/webrev00/
> <http://cr.openjdk.java.net/%7Ekaddepalli/8194044/webrev00/>
>
> This was caused due to the fix for JDK-8175015, in which the line 446
> in Win32ShellFolderManager2.java was changed from “getDrives()” to
> Win32ShellFolder2.listRoots().
>
> While the earlier function returns an object of Win32ShellFolder2, the
> latter returns an array of Files.
>
> The condition on line 450: “return (sf.isFileSystem()&&sf.parent !=
> null && sf.parent.equals(Win32ShellFolder2.listRoots())” was returning
> false because of the wrong object being passed. Earlier it was a
> Win32ShellFolder2 object, and the comparision was done properly, but
> with the changes, the equals fucnction was receiving a file array
> object, and hence it was immediately returning false, leading to the
> problem of empty strings being shown for Root drives.
>
> The fix is to replace “Win32ShellFolder2.listRoots()” with
> “getDrives()” function. With this fix, the regression is addressed, as
> well as the original JDK-8175015 which was a memory leak issue.
>
> Thanks,
>
> Krishna
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20180103/5ac9b3e7/attachment.html>
More information about the swing-dev
mailing list