Skip to content

Commit

Permalink
Improve code comments about GraalVM versions
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
  • Loading branch information
sschuberth committed Jun 28, 2023
1 parent e35fc76 commit a1206d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ class FoojayApi {
}

internal fun match(distributionName: String, version: JavaLanguageVersion, operatingSystem: OperatingSystem, architecture: Architecture): Package? {
// Old GraalVM releases are special in that the JVM version they target is part of the distribution name instead
// of the release version. For these releases "jdk_version" instead of "version" must be used as they key.
// Old GraalVM releases are special in that the Java language version they target is part of the distribution
// name and the release version is unrelated to the Java language version. That is why for these distributions
// "jdk_version" instead of "version" must be used as the query key.
val versionApiKey = when {
distributionName.startsWith("graalvm_ce") -> "jdk_version"
else -> "version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ val j9Aliases = mapOf(
)

/**
* Given a list of [distributions], return those that match the provided [vendor], JVM [implementation], and Java
* language [version].
* Given a list of [distributions], return those that match the provided [vendor] and JVM [implementation]. The Java
* language [version] is only used to remove wrong GraalVM distributions; no general version filtering is done here.
*/
fun match(
distributions: List<Distribution>,
Expand Down

0 comments on commit a1206d8

Please sign in to comment.