mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '2.7.x' into 3.0.x
Closes gh-35763
This commit is contained in:
commit
9149fc3e77
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2023 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.
|
||||
@ -30,6 +30,7 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Phillip Webb
|
||||
* @author Moritz Halbritter
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public enum JavaVersion {
|
||||
@ -47,7 +48,12 @@ public enum JavaVersion {
|
||||
/**
|
||||
* Java 19.
|
||||
*/
|
||||
NINETEEN("19", Future.class, "state");
|
||||
NINETEEN("19", Future.class, "state"),
|
||||
|
||||
/**
|
||||
* Java 20.
|
||||
*/
|
||||
TWENTY("20", Class.class, "accessFlags");
|
||||
|
||||
private final String name;
|
||||
|
||||
|
@ -97,4 +97,10 @@ class JavaVersionTests {
|
||||
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.NINETEEN);
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledOnJre(JRE.JAVA_20)
|
||||
void currentJavaVersionTwenty() {
|
||||
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user