<Swing Dev> Back port of fix JDK-7067885: FileChooser does not display soft link name if link is to nonexistent file/directory to OpenJDK-8
Philip Race
philip.race at oracle.com
Fri Nov 4 14:42:51 UTC 2016
And this is a reminder to run applicable tests before pushing.
Also given the first fix causing a regression and that this is a
long-standing issue I don't
see why we need to "rush" to backport even this 2nd fix.
I'd like to see proper bake time in JDK 9 first.
-phil.
On 11/3/16, 11:58 PM, Semyon Sadetsky wrote:
>
> Alok,
>
> JDK-7067885 <https://bugs.openjdk.java.net/browse/JDK-7067885> fix
> caused regression and was reverted. Consider to backport JDK-8168899.
>
> --Semyon
>
>
> On 04.11.2016 07:52, Sharma, Alok Kumar (OSTL) wrote:
>>
>> Hi,
>>
>> JDK-7067885 <https://bugs.openjdk.java.net/browse/JDK-7067885> fix is
>> applicable to OpenJDK-8, Code changes and testing for OpenJDK-8 are done.
>>
>> Mercurial diff for updated source change:
>>
>> -----------------------------------------------------------------------------------------------------------------------
>>
>>
>> diff -r 687fd7c7986d src/share/classes/sun/awt/shell/ShellFolder.java
>>
>> --- a/src/share/classes/sun/awt/shell/ShellFolder.java Tue Mar 04
>> 11:51:53 2014 -0800
>>
>> +++ b/src/share/classes/sun/awt/shell/ShellFolder.java Wed Nov 02
>> 11:15:16 2016 +0530
>>
>> @@ -30,6 +30,10 @@
>>
>> import java.awt.Toolkit;
>>
>> import java.io.*;
>>
>> import java.io.FileNotFoundException;
>>
>> +import java.nio.file.Files;
>>
>> +import java.nio.file.LinkOption;
>>
>> +import java.nio.file.Path;
>>
>> +import java.nio.file.Paths;
>>
>> import java.util.*;
>>
>> import java.util.concurrent.Callable;
>>
>> @@ -236,10 +240,11 @@
>>
>> * @exception FileNotFoundException if file does not exist
>>
>> */
>>
>> public static ShellFolder getShellFolder(File file) throws
>> FileNotFoundException {
>>
>> + Path path = Paths.get(file.getPath());
>>
>> if (file instanceof ShellFolder) {
>>
>> return (ShellFolder)file;
>>
>> }
>>
>> - if (!file.exists()) {
>>
>> + if (!Files.exists(path, LinkOption.NOFOLLOW_LINKS)) {
>>
>> throw new FileNotFoundException();
>>
>> }
>>
>> return shellFolderManager.createShellFolder(file);
>>
>> -----------------------------------------------------------------------------------------------------------------------
>>
>>
>> Regards,
>>
>> Alok
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20161104/8b6b56f7/attachment.html>
More information about the swing-dev
mailing list