Mercurial > people > rkennke > jdk9-shenandoah-final > nashorn
changeset 1278:4dc7eb763139
8080471: fix usage of replace and file separator in Nashorn tests
Summary: Two tests should use replace instead of replaceAll, and there is a typo in the usage of File.separator.
Reviewed-by: attila, hannesw
author | mhaupt |
---|---|
date | Fri, 15 May 2015 10:21:48 +0200 |
parents | 92958064570c |
children | 01a9bdf3f840 |
files | test/script/nosecurity/JDK-8050964.js test/script/nosecurity/JDK-8055034.js |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/test/script/nosecurity/JDK-8050964.js Fri May 15 10:19:37 2015 +0200 +++ b/test/script/nosecurity/JDK-8050964.js Fri May 15 10:21:48 2015 +0200 @@ -47,9 +47,9 @@ } var javahome = System.getProperty("java.home"); -var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater); +var jdepsPath = javahome + "/../bin/jdeps".replace(/\//g, File.separator); if (! new File(jdepsPath).isFile()) { - jdepsPath = javahome + "/bin/jdeps".replaceAll(/\//g, File.separater); + jdepsPath = javahome + "/bin/jdeps".replace(/\//g, File.separator); } // run jdep on nashorn.jar - only summary but print profile info
--- a/test/script/nosecurity/JDK-8055034.js Fri May 15 10:19:37 2015 +0200 +++ b/test/script/nosecurity/JDK-8055034.js Fri May 15 10:21:48 2015 +0200 @@ -46,10 +46,10 @@ // we want to use nashorn.jar passed and not the one that comes with JRE var jjsCmd = javahome + "/../bin/jjs"; -jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater); +jjsCmd = jjsCmd.toString().replace(/\//g, File.separator); if (! new File(jjsCmd).isFile()) { jjsCmd = javahome + "/bin/jjs"; - jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater); + jjsCmd = jjsCmd.toString().replace(/\//g, File.separator); } jjsCmd += " -J-Xbootclasspath/p:" + nashornJar;