Skip to content

Commit

Permalink
Allow internal JDK builds to be used with Substrate. (#1202)
Browse files Browse the repository at this point in the history
When building the JDK from sources, by default the version name will contain the "internal-" String.
This patch allows JDK versions containing this "internal-" String to be used as sources for GraalVM builds

Fix for #1201
  • Loading branch information
johanvos authored Feb 21, 2023
1 parent 5fdd8b7 commit 6be501d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ public Version getGraalVMJavaVersion() throws IOException {
if (responses == null || responses.isEmpty()) {
throw new IOException("Couldn't determine GraalVM's Java version");
}
Matcher m = r.matcher(responses.get(0));
String realVersion = responses.get(0).replaceAll("-internal", "");
Matcher m = r.matcher(realVersion);
if (!m.find()) {
throw new IOException("Couldn't determine GraalVM's Java version for " + responses.get(0));
}
Expand Down

0 comments on commit 6be501d

Please sign in to comment.