Merge branch '2.7.x' into 3.0.x

Closes gh-37363
pull/37462/head
Andy Wilkinson 1 year ago
commit eba2f718a7

@ -21,6 +21,7 @@ import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.SortedSet;
import java.util.concurrent.Future;
import org.springframework.util.ClassUtils;
@ -57,7 +58,13 @@ public enum JavaVersion {
* Java 20.
* @since 2.7.13
*/
TWENTY("20", Class.class, "accessFlags");
TWENTY("20", Class.class, "accessFlags"),
/**
* Java 21.
* @since 2.7.16
*/
TWENTY_ONE("21", SortedSet.class, "getFirst");
private final String name;

@ -103,4 +103,10 @@ class JavaVersionTests {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY);
}
@Test
@EnabledOnJre(JRE.JAVA_21)
void currentJavaVersionTwentyOne() {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY_ONE);
}
}

Loading…
Cancel
Save