8080471: fix usage of replace and file separator in Nashorn tests

Two tests should use replace instead of replaceAll, and there is a typo in the usage of File.separator.

Reviewed-by: attila, hannesw
This commit is contained in:
Michael Haupt 2015-05-15 10:21:48 +02:00
parent 96747306e2
commit 6a8c6779ea
2 changed files with 4 additions and 4 deletions

View File

@ -47,9 +47,9 @@ if (! nashornJar.isAbsolute()) {
}
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

View File

@ -46,10 +46,10 @@ if (! nashornJar.isAbsolute()) {
// 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;