deprecate java less-than 17 (#16370) (#16381)

(cherry picked from commit 3d13ebe33e)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2024-08-09 09:15:58 +01:00 committed by GitHub
parent 30735bf02e
commit f0fe4ce43f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 0 deletions

View file

@ -321,6 +321,9 @@ class LogStash::Runner < Clamp::StrictCommand
if JavaVersion::CURRENT < JavaVersion::JAVA_11
logger.warn I18n.t("logstash.runner.java.version",
:java_home => java.lang.System.getProperty("java.home"))
elsif JavaVersion::CURRENT < JavaVersion::JAVA_17
deprecation_logger.deprecated I18n.t("logstash.runner.java.version_17_minimum",
:java_home => java.lang.System.getProperty("java.home"))
end
logger.warn I18n.t("logstash.runner.java.home") if ENV["JAVA_HOME"]

View file

@ -446,6 +446,12 @@ en:
Running Logstash with the bundled JDK is recommended.
The bundled JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability.
If you have compelling reasons for using your own JDK (organizational-specific compliance requirements, for example), you can configure LS_JAVA_HOME to use that version instead.
version_17_minimum: >-
Starting from Logstash 9.0, the minimum required version of Java will be Java 17;
your Java version from `%{java_home}` does not meet this requirement.
Running Logstash with the bundled JDK is recommended.
The bundled JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability.
If you have compelling reasons for using your own JDK (organizational-specific compliance requirements, for example), the version you supply with LS_JAVA_HOME must meet the minimum requirements.
agent:
sighup: >-
SIGHUP received.

View file

@ -31,6 +31,8 @@ public class JavaVersion implements Comparable<JavaVersion> {
public static final JavaVersion CURRENT = parse(System.getProperty("java.specification.version"));
public static final JavaVersion JAVA_11 = parse("11");
public static final JavaVersion JAVA_17 = parse("17");
private final List<Integer> version;
private JavaVersion(List<Integer> version){