mirror of
https://github.com/actions/setup-java.git
synced 2026-07-08 16:20:44 +03:00
Map Zulu x86 architecture to i686 for Azul Metadata API
The Azul Metadata API's `arch=x86` returns both 32-bit (i686) and 64-bit (x64) packages. Because the two variants share identical java_version and distro_version, setup-java cannot distinguish them and may resolve an explicit `architecture: x86` request to a 64-bit JDK (and for Java 21+, where 32-bit is dropped, x86 silently returns x64 instead of failing). The legacy Zulu Discovery API used `arch=x86&hw_bitness=32` to target only 32-bit builds. The Metadata API exposes the equivalent via `arch=i686`, which returns only genuine 32-bit builds with full version parity to the old behavior. Map x86 -> i686 to restore correct 32-bit resolution. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Vendored
+5
-1
@@ -131465,7 +131465,11 @@ class ZuluDistribution extends JavaBase {
|
||||
case 'x64':
|
||||
return 'x64';
|
||||
case 'x86':
|
||||
return 'x86';
|
||||
// The Azul Metadata API's "x86" value returns both 32-bit (i686) and
|
||||
// 64-bit (x64) packages, which are indistinguishable by version and
|
||||
// would let a 32-bit request resolve to a 64-bit JDK. Use "i686" to
|
||||
// target only genuine 32-bit builds, matching the legacy API behavior.
|
||||
return 'i686';
|
||||
case 'aarch64':
|
||||
case 'arm64':
|
||||
return 'aarch64';
|
||||
|
||||
Reference in New Issue
Block a user