Set Java 17 as system-wide default version
What does this MR do?
Java 17 was set as the default version in Remove JDK 8 support out of the box (!138 - merged) in this line, however, the system-wide default version of Java was still set at 11
, because the .tool-versions
file listed adoptopenjdk-11.0.14+101
as the first entry, thereby making it the default version.
This means that the Java version would only be set to 17
if the analyzer is used, whereas if you simply invoke java --version
from the commandline and don't use the analyzer, then Java 11
will be used. This results in test failures like this one and possibly this one.
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 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?
- SAST Deprecation: Out-of-the-box Java 8 support... (gitlab-org/gitlab#352549 - closed)
- Remove java 8 from spotbugs (gitlab-org/gitlab#353646 - closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Auto-DevOps template (also in CE) -
Job definition example -
CI Templates (to be removed) -
Vendored CI Templates (also in CE)
-
-
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer