@@ -36,7 +36,7 @@ export class JdkDownloaderAction {
3636    private  readonly  DOWNLOAD_DIR  =  path . join ( __dirname ,  'jdk_downloads' ) ; 
3737    private  startTimer : number  |  null  =  null ; 
3838
39-     private  jdkType ? : string ; 
39+     private  jdkType ! : string ; 
4040    private  jdkVersion ?: string ; 
4141    private  osType ?: string ; 
4242    private  machineArch ?: string ; 
@@ -132,7 +132,7 @@ export class JdkDownloaderAction {
132132
133133    private  jdkInstallationManager  =  async  ( )  =>  { 
134134        const  startingInstallationMessage  =  l10n . value ( "jdk.downloader.message.downloadingAndCompletingSetup" ,  { 
135-             jdkType : this . jdkType , 
135+             jdkType :   JdkDownloaderView . getJdkLabel ( this . jdkType ) , 
136136            jdkVersion : this . jdkVersion 
137137        } ) ; 
138138
@@ -144,7 +144,7 @@ export class JdkDownloaderAction {
144144        } 
145145        await  this . downloadAndVerify ( ) ; 
146146        const  downloadSuccessLabel  =  l10n . value ( "jdk.downloader.message.downloadCompleted" ,  { 
147-             jdkType : this . jdkType , 
147+             jdkType : JdkDownloaderView . getJdkLabel ( this . jdkType ) , 
148148            jdkVersion : this . jdkVersion , 
149149            osType : this . osType 
150150        } ) ; 
@@ -187,7 +187,7 @@ export class JdkDownloaderAction {
187187
188188    private  downloadAndVerify  =  async  ( ) : Promise < void >  =>  { 
189189        const  message  =  l10n . value ( "jdk.downloader.message.downloadProgressBar" ,  { 
190-             jdkType : this . jdkType , 
190+             jdkType : JdkDownloaderView . getJdkLabel ( this . jdkType ) , 
191191            jdkVersion : this . jdkVersion 
192192        } ) ; 
193193        await  downloadFileWithProgressBar ( this . downloadUrl ! ,  this . downloadFilePath ! ,  message ) ; 
@@ -196,7 +196,7 @@ export class JdkDownloaderAction {
196196        const  doesMatch  =  await  this . checksumMatch ( ) ; 
197197        if  ( ! doesMatch )  { 
198198            const  checksumMatchFailedLabel  =  l10n . value ( "jdk.downloader.message.downloadFailed" ,  { 
199-                 jdkType : this . jdkType , 
199+                 jdkType : JdkDownloaderView . getJdkLabel ( this . jdkType ) , 
200200                jdkVersion : this . jdkVersion , 
201201                osType : this . osType 
202202            } ) ; 
@@ -230,7 +230,7 @@ export class JdkDownloaderAction {
230230        }  catch  ( err )  { 
231231            LOGGER . error ( `Error while extracting JDK: ${ ( err  as  Error ) . message }  ` ) ; 
232232            throw  new  Error ( l10n . value ( "jdk.downloader.error_message.extractionError" ,  { 
233-                 jdkType : this . jdkType , 
233+                 jdkType : JdkDownloaderView . getJdkLabel ( this . jdkType ) , 
234234                jdkVersion : this . jdkVersion 
235235            } ) ) ; 
236236        } 
@@ -250,11 +250,11 @@ export class JdkDownloaderAction {
250250        const  tempDirectoryPath  =  path . join ( this . DOWNLOAD_DIR ,  matchingJdkDir [ 0 ] ) ; 
251251
252252        // If directory with same name is present in the user selected download location then ask user if they want to delete it or not?  
253-         const  newDirName  =  `${ this . jdkType ! . split ( ' ' ) . join ( '_' ) }  -${ this . jdkVersion }  ` ; 
253+         const  newDirName  =  `${ this . jdkType . split ( ' ' ) . join ( '_' ) }  -${ this . jdkVersion }  ` ; 
254254        const  newDirectoryPath  =  await  this . handleJdkPaths ( newDirName ,  this . installationPath ! ,  this . osType ! ) ; 
255255        if  ( newDirectoryPath  ===  null )  { 
256256            throw  new  Error ( l10n . value ( 'jdk.downloader.error_message.jdkNewDirectoryIssueCannotInstall' ,  { 
257-                 jdkType : this . jdkType , 
257+                 jdkType : JdkDownloaderView . getJdkLabel ( this . jdkType ) , 
258258                jdkVersion : this . jdkVersion , 
259259                newDirName
260260            } ) ) ; 
@@ -278,7 +278,7 @@ export class JdkDownloaderAction {
278278    private  installationCleanup  =  ( tempDirPath : string ,  newDirPath : string )  =>  { 
279279        const  currentTime  =  getCurrentUTCDateInSeconds ( ) ; 
280280        const  downloadTelemetryEvent : JdkDownloadEventData  =  { 
281-             vendor : this . jdkType ! , 
281+             vendor : this . jdkType , 
282282            version : this . jdkVersion ! , 
283283            os : this . osType ! , 
284284            arch : this . machineArch ! , 
0 commit comments