8054343: Nashorn: Some tests fails on windows with AccessControlException
authoryan
Mon, 01 Sep 2014 17:34:37 +0400
changeset 26373 cd907cf7bf7a
parent 26253 059266c07564
child 26374 5bc67576b50e
8054343: Nashorn: Some tests fails on windows with AccessControlException Reviewed-by: lagergren, sundar Contributed-by: Sergey Lugovoy <sergey.lugovoy@oracle.com>
nashorn/test/script/basic/compile-octane-normal.js
nashorn/test/script/basic/compile-octane-splitter.js
nashorn/test/script/basic/compile-octane.js
--- a/nashorn/test/script/basic/compile-octane-normal.js	Thu Aug 28 16:38:23 2014 +0200
+++ b/nashorn/test/script/basic/compile-octane-normal.js	Mon Sep 01 17:34:37 2014 +0400
@@ -38,5 +38,5 @@
  */
 
 var fn  = __DIR__ + 'compile-octane.js';
-var url = "file://" + fn;
-loadWithNewGlobal(new java.net.URL(url));
+var url = new java.io.File(fn).toURL();
+loadWithNewGlobal(url);
--- a/nashorn/test/script/basic/compile-octane-splitter.js	Thu Aug 28 16:38:23 2014 +0200
+++ b/nashorn/test/script/basic/compile-octane-splitter.js	Mon Sep 01 17:34:37 2014 +0400
@@ -40,5 +40,5 @@
  */
 
 var fn  = __DIR__ + 'compile-octane.js';
-var url = "file://" + fn;
-loadWithNewGlobal(new java.net.URL(url));
+var url = new java.io.File(fn).toURL();
+loadWithNewGlobal(url);
--- a/nashorn/test/script/basic/compile-octane.js	Thu Aug 28 16:38:23 2014 +0200
+++ b/nashorn/test/script/basic/compile-octane.js	Mon Sep 01 17:34:37 2014 +0400
@@ -132,7 +132,7 @@
         str2 += " processing file: " + file + "...";
         print_if_verbose(str2);
         }
-        newGlobal.load("file://" + path + file);
+        newGlobal.load(new java.io.File(path + file).toURL());
     }
     }
     print("Done.");