Details
-
Bug
-
Resolution: Fixed
-
P3
-
None
Description
src/main/java/com/oracle/tools/packager/windows/WindowsBundlerParam.java
211: Pattern versionMatcher = Pattern.compile("java version \"((\\d+.\\d+.\\d+)_(\\d+))(-(.*))?\"");
src/main/native/tests/DevTest/DevTest/nbproject/build-impl.xml
public static void extractFlagsFromVersion(Map<String, ? super Object> params, String versionOutput) {
Pattern bitArchPattern = Pattern.compile("(\\d*)[- ]?[bB]it");
Matcher matcher = bitArchPattern.matcher(versionOutput);
if (matcher.find()) {
params.put(".runtime.bit-arch", matcher.group(1));
} else {
// presume 32 bit on no match
params.put(".runtime.bit-arch", "32");
}
Pattern versionMatcher = Pattern.compile("java version \"((\\d+.\\d+.\\d+)_(\\d+))(-(.*))?\"");
matcher = versionMatcher.matcher(versionOutput);
if (matcher.find()) {
params.put(".runtime.version", matcher.group(1));
params.put(".runtime.version.release", matcher.group(2));
params.put(".runtime.version.update", matcher.group(3));
params.put(".runtime.version.modifiers", matcher.group(5));
} else {
params.put(".runtime.version", "");
params.put(".runtime.version.release", "");
params.put(".runtime.version.update", "");
params.put(".runtime.version.modifiers", "");
}
}
211: Pattern versionMatcher = Pattern.compile("java version \"((\\d+.\\d+.\\d+)_(\\d+))(-(.*))?\"");
src/main/native/tests/DevTest/DevTest/nbproject/build-impl.xml
public static void extractFlagsFromVersion(Map<String, ? super Object> params, String versionOutput) {
Pattern bitArchPattern = Pattern.compile("(\\d*)[- ]?[bB]it");
Matcher matcher = bitArchPattern.matcher(versionOutput);
if (matcher.find()) {
params.put(".runtime.bit-arch", matcher.group(1));
} else {
// presume 32 bit on no match
params.put(".runtime.bit-arch", "32");
}
Pattern versionMatcher = Pattern.compile("java version \"((\\d+.\\d+.\\d+)_(\\d+))(-(.*))?\"");
matcher = versionMatcher.matcher(versionOutput);
if (matcher.find()) {
params.put(".runtime.version", matcher.group(1));
params.put(".runtime.version.release", matcher.group(2));
params.put(".runtime.version.update", matcher.group(3));
params.put(".runtime.version.modifiers", matcher.group(5));
} else {
params.put(".runtime.version", "");
params.put(".runtime.version.release", "");
params.put(".runtime.version.update", "");
params.put(".runtime.version.modifiers", "");
}
}