Commit c4c4e515 authored by Mark's avatar Mark
Browse files

Enusure that *FEATURES* contains an integer :JAVA-<n> value

With Project Loom, *FEATURES* contains :JAVA-16 :|JVM-16-loom|.
parent 5baf7352
......@@ -2429,6 +2429,22 @@ public final class Lisp
platformVersion = javaVersion;
}
}
// We wish to declare an integer Java version, but
// specialized builds can prefix further information in the
// java.version property
try {
Integer.parseInt(javaVersion);
} catch (NumberFormatException e) {
for (int i = 0; i < javaVersion.length(); i++) {
char c = javaVersion.charAt(i); // Unicode?
if (!Character.isDigit(c)) {
// Push the non-conforming keyword for completeness
featureList.push(internKeyword("JAVA-" + javaVersion));
platformVersion = javaVersion.substring(0, i);
break;
}
}
}
featureList = featureList.push(internKeyword("JAVA-" + platformVersion));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment