-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: check java version was criteria was ambiguous #5363
Conversation
@W-14888195@ Modified the check to include java option `XshowSettings:properties`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the test from integration to jest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! 🎉
Check Java Version worked for the following Java versions:
- Salesforce-approved Java 11 use for Core development ✅
- Zulu Java 17 ✅
- Oracle Java 17 ✅
handle the error from the callback if presnet. Issue better message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! 🎉
Test Cases (run using VSIXs generated from Commit Workflow):
- Leave the Java Home setting blank -> Java Home should take the value of the $JAVA_HOME environment variable set locally ✅ (this was working as expected for Pete but Daphne has a system issue)
- Invalid Java version (Java 21) -> should get
wrong_java_version_text
error message ✅ - Path to random empty folder -> should get
wrong_java_version_text
error message ✅ - Salesforce-approved Java 11 use for Core development ✅
- Zulu Java 17 ✅
- Oracle Java 17 ✅
Modified the check to include java option
XshowSettings:properties
What does this PR do?
What issues does this PR fix or reference?
@W-14888195@ #5358
Functionality Before
The validation of java version used a string match for
build 17.
and the customer's java version reportedbuild 17+
causing a false positive when check version during startupFunctionality After
The validation function has been changed to run the java version command with an option that displays all of the assign System properties the JVM will be using. One of the is
java.version = nn[.nn[.nn]]
. This representation is more reliable that using thebuild
string from the java version command.