Skip to content

Commit f673e09

Browse files
committed
Merge branch '3.2.x'
Closes gh-39827
2 parents 5c6140f + e8acbc1 commit f673e09

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,7 +64,13 @@ public enum JavaVersion {
6464
* Java 21.
6565
* @since 2.7.16
6666
*/
67-
TWENTY_ONE("21", SortedSet.class, "getFirst");
67+
TWENTY_ONE("21", SortedSet.class, "getFirst"),
68+
69+
/**
70+
* Java 22.
71+
* @since 3.2.4
72+
*/
73+
TWENTY_TWO("22", Console.class, "isTerminal");
6874

6975
private final String name;
7076

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -109,4 +109,10 @@ void currentJavaVersionTwentyOne() {
109109
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY_ONE);
110110
}
111111

112+
@Test
113+
@EnabledOnJre(JRE.JAVA_22)
114+
void currentJavaVersionTwentyTwo() {
115+
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY_TWO);
116+
}
117+
112118
}

0 commit comments

Comments
 (0)