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