mirror of
https://github.com/actions/setup-java.git
synced 2026-06-23 20:47:43 +00:00
Fixes from review
This commit is contained in:
parent
d8f95befc8
commit
b8110ecdf3
9
dist/setup/index.js
vendored
9
dist/setup/index.js
vendored
@ -77825,16 +77825,15 @@ class AdoptDistribution extends base_installer_1.JavaBase {
|
|||||||
constructor(installerOptions, jvmImpl, temurinDistribution = null) {
|
constructor(installerOptions, jvmImpl, temurinDistribution = null) {
|
||||||
super(`Adopt-${jvmImpl}`, installerOptions);
|
super(`Adopt-${jvmImpl}`, installerOptions);
|
||||||
this.jvmImpl = jvmImpl;
|
this.jvmImpl = jvmImpl;
|
||||||
this.temurinDistribution = temurinDistribution;
|
|
||||||
if (temurinDistribution !== null &&
|
if (temurinDistribution !== null &&
|
||||||
jvmImpl !== AdoptImplementation.Hotspot) {
|
jvmImpl !== AdoptImplementation.Hotspot) {
|
||||||
throw new Error('Only Hotspot JVM is supported by Temurin.');
|
throw new Error('Only Hotspot JVM is supported by Temurin.');
|
||||||
}
|
}
|
||||||
// Only use the temurin repo for Hotspot JVMs
|
// Only use the temurin repo for Hotspot JVMs
|
||||||
if (temurinDistribution === null &&
|
this.temurinDistribution =
|
||||||
jvmImpl === AdoptImplementation.Hotspot) {
|
temurinDistribution !== null && temurinDistribution !== void 0 ? temurinDistribution : (jvmImpl === AdoptImplementation.Hotspot
|
||||||
this.temurinDistribution = new installer_1.TemurinDistribution(installerOptions, installer_1.TemurinImplementation.Hotspot);
|
? new installer_1.TemurinDistribution(installerOptions, installer_1.TemurinImplementation.Hotspot)
|
||||||
}
|
: null);
|
||||||
}
|
}
|
||||||
findPackageForDownload(version) {
|
findPackageForDownload(version) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
|||||||
@ -29,10 +29,12 @@ export enum AdoptImplementation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class AdoptDistribution extends JavaBase {
|
export class AdoptDistribution extends JavaBase {
|
||||||
|
private readonly temurinDistribution: TemurinDistribution | null;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
installerOptions: JavaInstallerOptions,
|
installerOptions: JavaInstallerOptions,
|
||||||
private readonly jvmImpl: AdoptImplementation,
|
private readonly jvmImpl: AdoptImplementation,
|
||||||
private readonly temurinDistribution: TemurinDistribution | null = null
|
temurinDistribution: TemurinDistribution | null = null
|
||||||
) {
|
) {
|
||||||
super(`Adopt-${jvmImpl}`, installerOptions);
|
super(`Adopt-${jvmImpl}`, installerOptions);
|
||||||
|
|
||||||
@ -44,15 +46,14 @@ export class AdoptDistribution extends JavaBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only use the temurin repo for Hotspot JVMs
|
// Only use the temurin repo for Hotspot JVMs
|
||||||
if (
|
this.temurinDistribution =
|
||||||
temurinDistribution === null &&
|
temurinDistribution ??
|
||||||
jvmImpl === AdoptImplementation.Hotspot
|
(jvmImpl === AdoptImplementation.Hotspot
|
||||||
) {
|
? new TemurinDistribution(
|
||||||
this.temurinDistribution = new TemurinDistribution(
|
installerOptions,
|
||||||
installerOptions,
|
TemurinImplementation.Hotspot
|
||||||
TemurinImplementation.Hotspot
|
)
|
||||||
);
|
: null);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async findPackageForDownload(
|
protected async findPackageForDownload(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user