spelling: java script -- not JavaScript (#37057)
This commit is contained in:
parent
cde126dbff
commit
0154052335
|
@ -150,7 +150,7 @@ class BuildPlugin implements Plugin<Project> {
|
||||||
}
|
}
|
||||||
|
|
||||||
String inFipsJvmScript = 'print(java.security.Security.getProviders()[0].name.toLowerCase().contains("fips"));'
|
String inFipsJvmScript = 'print(java.security.Security.getProviders()[0].name.toLowerCase().contains("fips"));'
|
||||||
boolean inFipsJvm = Boolean.parseBoolean(runJavascript(project, runtimeJavaHome, inFipsJvmScript))
|
boolean inFipsJvm = Boolean.parseBoolean(runJavaAsScript(project, runtimeJavaHome, inFipsJvmScript))
|
||||||
|
|
||||||
// Build debugging info
|
// Build debugging info
|
||||||
println '======================================='
|
println '======================================='
|
||||||
|
@ -438,28 +438,28 @@ class BuildPlugin implements Plugin<Project> {
|
||||||
String versionInfoScript = 'print(' +
|
String versionInfoScript = 'print(' +
|
||||||
'java.lang.System.getProperty("java.vendor") + " " + java.lang.System.getProperty("java.version") + ' +
|
'java.lang.System.getProperty("java.vendor") + " " + java.lang.System.getProperty("java.version") + ' +
|
||||||
'" [" + java.lang.System.getProperty("java.vm.name") + " " + java.lang.System.getProperty("java.vm.version") + "]");'
|
'" [" + java.lang.System.getProperty("java.vm.name") + " " + java.lang.System.getProperty("java.vm.version") + "]");'
|
||||||
return runJavascript(project, javaHome, versionInfoScript).trim()
|
return runJavaAsScript(project, javaHome, versionInfoScript).trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Finds the parsable java specification version */
|
/** Finds the parsable java specification version */
|
||||||
private static String findJavaSpecificationVersion(Project project, String javaHome) {
|
private static String findJavaSpecificationVersion(Project project, String javaHome) {
|
||||||
String versionScript = 'print(java.lang.System.getProperty("java.specification.version"));'
|
String versionScript = 'print(java.lang.System.getProperty("java.specification.version"));'
|
||||||
return runJavascript(project, javaHome, versionScript)
|
return runJavaAsScript(project, javaHome, versionScript)
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String findJavaVendor(Project project, String javaHome) {
|
private static String findJavaVendor(Project project, String javaHome) {
|
||||||
String vendorScript = 'print(java.lang.System.getProperty("java.vendor"));'
|
String vendorScript = 'print(java.lang.System.getProperty("java.vendor"));'
|
||||||
return runJavascript(project, javaHome, vendorScript)
|
return runJavaAsScript(project, javaHome, vendorScript)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Finds the parsable java specification version */
|
/** Finds the parsable java specification version */
|
||||||
private static String findJavaVersion(Project project, String javaHome) {
|
private static String findJavaVersion(Project project, String javaHome) {
|
||||||
String versionScript = 'print(java.lang.System.getProperty("java.version"));'
|
String versionScript = 'print(java.lang.System.getProperty("java.version"));'
|
||||||
return runJavascript(project, javaHome, versionScript)
|
return runJavaAsScript(project, javaHome, versionScript)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Runs the given javascript using jjs from the jdk, and returns the output */
|
/** Runs the given javascript using jjs from the jdk, and returns the output */
|
||||||
private static String runJavascript(Project project, String javaHome, String script) {
|
private static String runJavaAsScript(Project project, String javaHome, String script) {
|
||||||
ByteArrayOutputStream stdout = new ByteArrayOutputStream()
|
ByteArrayOutputStream stdout = new ByteArrayOutputStream()
|
||||||
ByteArrayOutputStream stderr = new ByteArrayOutputStream()
|
ByteArrayOutputStream stderr = new ByteArrayOutputStream()
|
||||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
|
|
|
@ -208,7 +208,7 @@ integTestCluster {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Closure notRunningFips = {
|
Closure notRunningFips = {
|
||||||
Boolean.parseBoolean(BuildPlugin.runJavascript(project, project.runtimeJavaHome,
|
Boolean.parseBoolean(BuildPlugin.runJavaAsScript(project, project.runtimeJavaHome,
|
||||||
'print(java.security.Security.getProviders()[0].name.toLowerCase().contains("fips"));')) == false
|
'print(java.security.Security.getProviders()[0].name.toLowerCase().contains("fips"));')) == false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue