Skip to content

Commit

Permalink
Warn users of old Java version 18 months before end of life (#8543)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEWaite authored Oct 2, 2023
1 parent cefeb31 commit acd8196
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private static String getId() {

@Override
public boolean isActivated() {
return !disabled && getDeprecationPeriod().getYears() < 2;
return !disabled && getDeprecationPeriod().toTotalMonths() < 18;
}

@Override
Expand Down Expand Up @@ -156,7 +156,7 @@ private static Period getDeprecationPeriod() {

@NonNull
private static Severity getSeverity() {
return getDeprecationPeriod().getYears() < 1 ? Severity.DANGER : Severity.WARNING;
return getDeprecationPeriod().toTotalMonths() < 9 ? Severity.DANGER : Severity.WARNING;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:st="jelly:stapler">
${%blurb(it.javaVersion)}
${%blurb}
</j:jelly>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
blurb = Recommends Java {0,number} for running Jenkins if an older version is used.
blurb = Recommends a Java upgrade for Jenkins if an older Java version is used.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

blurb=Recomenda o Java {0,number} para executar o Jenkins se uma versão anterior está em uso.
blurb=Recomenda uma atualização do Java para Jenkins se uma versão anterior do Java estiver em uso.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
blurb = Рекомендует запускать Jenkins на Java {0,number}, если используется более старая версия.
blurb = Рекомендует обновить Java для Jenkins, если используется более старая версия Java.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
blurb=若您使用的 Java 版本低於 {0,number},推薦您改用 Java {0,number} 來執行 Jenkins
blurb=如果使用較舊的 Java 版本,建議對 Jenkins 進行 Java 升級

0 comments on commit acd8196

Please # to comment.