Browse Source

Merge branch '3.2.x'

Closes gh-39827
pull/39828/head
Andy Wilkinson 2 years ago
parent
commit
f673e09cf5
  1. 10
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/JavaVersion.java
  2. 8
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/system/JavaVersionTests.java

10
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/JavaVersion.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -64,7 +64,13 @@ public enum JavaVersion { @@ -64,7 +64,13 @@ public enum JavaVersion {
* Java 21.
* @since 2.7.16
*/
TWENTY_ONE("21", SortedSet.class, "getFirst");
TWENTY_ONE("21", SortedSet.class, "getFirst"),
/**
* Java 22.
* @since 3.2.4
*/
TWENTY_TWO("22", Console.class, "isTerminal");
private final String name;

8
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/system/JavaVersionTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -109,4 +109,10 @@ class JavaVersionTests { @@ -109,4 +109,10 @@ class JavaVersionTests {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY_ONE);
}
@Test
@EnabledOnJre(JRE.JAVA_22)
void currentJavaVersionTwentyTwo() {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY_TWO);
}
}

Loading…
Cancel
Save