fix: use the JDK version from the JAR when no language version is recorded - #1466
fix: use the JDK version from the JAR when no language version is recorded#1466lenamonj wants to merge 1 commit into
Conversation
…orded The expression jdk_from_jar or existing if existing else "8" parses as (jdk_from_jar or existing) if existing else "8", so with no recorded language version the JDK version read from the Maven Central JAR was discarded and the spec defaulted to 8. The order is now JAR, then the existing value, then the default, as the comment above it describes. Closes oracle#1464 Signed-off-by: Jeff Lenamon <jlenamon@gmail.com>
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
behnazh-w
left a comment
There was a problem hiding this comment.
Thanks for spotting this issue and creating the PR. To be able to merge it, could you please sign the Oracle Contributor Agreement (OCA)?
|
Thanks for the review. The OCA was submitted on 6 September and is under review on Oracle's side; the check should turn green once it is recorded. |
Summary
Use the JDK version read from the Maven Central JAR when the database has no recorded language version.
Description of changes
selected_jdk_version = jdk_from_jar or existing if existing else "8"parses as(jdk_from_jar or existing) if existing else "8", so with no existinglanguage_versionthe JAR's JDK version was discarded and the spec defaulted to8. The expression is nowjdk_from_jar or existing or "8", the order the comment above it describes. A parametrized test covers the four combinations.Validate:
pytest tests/build_spec_generator/common_spec/test_maven_spec.pyfails onmainfor the JAR-without-existing case and passes with this change;make checkandmake testpass.Related issues
Closes #1464
Checklist