Skip to content

Bugfix: Set Java 17 as the system-wide default version

Adam Cohen requested to merge default-to-java-17-in-tool-versions into v3

What does this MR do?

Use Java 17 by default (gemnasium-maven!193 - merged) set the default Java version to 17 in the analyzer-wrapper, meaning that the default will be set to Java 17 when using the analyzer, however, the system-wide default Java version was still set to 11 because the .tool-versions file listed adoptopenjdk-11.0.7+10.1 as the first version, which is used as the default.

This MR moves adoptopenjdk-17.0.2+8 to the front of the list in the .tool-versions file so that it becomes the system-wide default Java version. This is necessary to fix this failing test, and it also provides a sensible default, since it's confusing to have the Java version set to 17 when using the analyzer, but default to 11 if the analyzer is not used - it should be set to 17 in both cases.

What are the relevant issue numbers?

gitlab-org/gitlab#362299 (closed)

Testing

Tested successfully here

Does this MR meet the acceptance criteria?

Edited by Adam Cohen

Merge request reports