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:
parent
96747306e2
commit
6a8c6779ea
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user