diff --git a/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java b/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java index 133ea2b37731..9d32eb45a771 100644 --- a/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java +++ b/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java @@ -24,13 +24,21 @@ package jenkins.monitor; +import edu.umd.cs.findbugs.annotations.NonNull; import hudson.Extension; import hudson.model.AdministrativeMonitor; import hudson.security.Permission; import java.io.IOException; +import java.time.LocalDate; +import java.time.Period; +import java.time.ZoneId; +import java.util.Collections; +import java.util.Date; +import java.util.Locale; +import java.util.NavigableMap; +import java.util.TreeMap; import jenkins.model.Jenkins; import jenkins.util.SystemProperties; -import jenkins.util.java.JavaUtils; import org.jenkinsci.Symbol; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.DoNotUse; @@ -46,15 +54,68 @@ @Symbol("javaVersionRecommendation") public class JavaVersionRecommendationAdminMonitor extends AdministrativeMonitor { + /** + * The list of supported Java long-term support (LTS) releases. The key is the {@link + * Runtime.Version#feature() feature-release counter}. The value is the date the Jenkins project + * drops support for that release, which must be before the date the Eclipse Temurin project + * drops support for that release. This list must remain synchronized with the one in {@code + * executable.Main}. + * + *
To add support for a Java version: + * + *
You are running Jenkins on Java {0}, support for which will end on or after June 21, 2022. \ - This is earlier than a previously announced date.
\ -The Long Term Support (LTS) line of Jenkins will continue support till September 2022.
\ -Please refer to the documentation for details on upgrading to Java 11.
+Recommended_Java_Version_Heading=Java {0,number} end of life in Jenkins +Recommended_Java_Version=You are running Jenkins on Java {0,number}, support for which will end on or after {1,date}. \ + Refer to the documentation for more details. diff --git a/core/src/main/resources/jenkins/monitor/JavaVersionRecommendationAdminMonitor/message_pt_BR.properties b/core/src/main/resources/jenkins/monitor/JavaVersionRecommendationAdminMonitor/message_pt_BR.properties index 25c54f9c654a..0c6a0bc82ea5 100644 --- a/core/src/main/resources/jenkins/monitor/JavaVersionRecommendationAdminMonitor/message_pt_BR.properties +++ b/core/src/main/resources/jenkins/monitor/JavaVersionRecommendationAdminMonitor/message_pt_BR.properties @@ -22,10 +22,6 @@ More\ Info=Mais informação Dismiss=Dispensar -Recommended_Java_Version=Você está executando o Jenkins com o Java {0}, cujo \ - suporte será encerrado em 21 de junho de 2022. Isto é antes do que a data previamente anunciada.
\ -A linha de suporte de longo período (LTS) do Jenkins continuará a suportar esta \ - versão até setembro de 2022.
Por favor se refira a \ - \ - a documentação para maiores detalhes sobre atualizar para o Java versão 11.
-Recommended_Java_Version_Heading=Fim de suporte ao Java {0} pelo Jenkins +Recommended_Java_Version=Você está executando o Jenkins com o Java {0,number}, cujo suporte será encerrado em {1,date}. \ + Se refira a a documentação para maiores detalhes. +Recommended_Java_Version_Heading=Fim de suporte ao Java {0,number} pelo Jenkins diff --git a/core/src/main/resources/jenkins/monitor/JavaVersionRecommendationAdminMonitor/message_ru.properties b/core/src/main/resources/jenkins/monitor/JavaVersionRecommendationAdminMonitor/message_ru.properties index b07389f4627b..75d24bd45678 100644 --- a/core/src/main/resources/jenkins/monitor/JavaVersionRecommendationAdminMonitor/message_ru.properties +++ b/core/src/main/resources/jenkins/monitor/JavaVersionRecommendationAdminMonitor/message_ru.properties @@ -1,11 +1,5 @@ -Recommended_Java_Version_Heading=Конец поддержки Java {0} в Jenkins -Recommended_Java_Version=Вы запустили Jenkins на Java {0}. Её поддержка будет \ - остановлена 21 июня 2022. \ - Это раньше, чем дата, объявленная ранее.
\ -Долгосрочно поддерживаемые (LTS) релизы Jenkins будут поддерживать её до сентября \ - 2022.
\ -Пожалуйста, смотрите детали об обновлении до Java 11 в \ - документации.
+Recommended_Java_Version_Heading=Конец поддержки Java {0,number} в Jenkins +Recommended_Java_Version=Вы запустили Jenkins на Java {0,number}. Её поддержка будет остановлена {1,date}. \ + Смотрите детали в документации. More\ Info=Подробнее Dismiss=Убрать diff --git a/war/src/main/java/executable/Main.java b/war/src/main/java/executable/Main.java index 1a537e46825e..9812f3d5b9e1 100644 --- a/war/src/main/java/executable/Main.java +++ b/war/src/main/java/executable/Main.java @@ -72,6 +72,10 @@ */ public class Main { + /** + * This list must remain synchronized with the one in {@code + * JavaVersionRecommendationAdminMonitor}. + */ private static final NavigableSet