Skip to content

Fixed jdkHome config value handler fallback to env vars#606

Merged
sid-srini merged 1 commit into
oracle:26.0.1from
sid-srini:fix-jdkhome-config-value-handler-fallback
Jun 5, 2026
Merged

Fixed jdkHome config value handler fallback to env vars#606
sid-srini merged 1 commit into
oracle:26.0.1from
sid-srini:fix-jdkhome-config-value-handler-fallback

Conversation

@sid-srini

Copy link
Copy Markdown
Member

Fixed handler.ts:jdkHomeValueHandler() to have the promise return the fallback env vars JDK_HOME or JAVA_HOME when no config value is defined.

  • The config getter returns the default value i.e. null, in such a case.
  • Thus, the defaultValue parameter cannot be used, since the vscode config getter returns the default value defined in package.json, causing the value to not be undefined.
  • So, a then() clause on the promise is needed to check for null or undefined value, and fallback to the env vars, if so.

Fixed handler.ts:jdkHomeValueHandler() to have the promise return the
fallback env vars JDK_HOME or JAVA_HOME when no config value is defined.
- The config getter returns the default value i.e. null, in such a case.
- Thus, the defaultValue parameter cannot be used, since the vscode
  config getter returns the default value defined in package.json,
  causing the value to not be `undefined`.
- So, a `then()` clause on the promise is needed to check for `null` or
  `undefined` value, and fallback to the env vars, if so.
@sid-srini sid-srini added this to the JVSC 26.0.1 milestone Jun 5, 2026
@sid-srini sid-srini requested a review from Achal1607 June 5, 2026 04:51
@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 5, 2026

@Achal1607 Achal1607 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @sid-srini thanks for identifying it. LGTM.

@sid-srini sid-srini merged commit 6e0821a into oracle:26.0.1 Jun 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants