Merge branch '3.2.x'

Closes gh-39827
This commit is contained in:
Andy Wilkinson 2024-03-04 10:27:45 +00:00
commit f673e09cf5
2 changed files with 15 additions and 3 deletions

View File

@ -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 {
* 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;

View File

@ -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 {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY_ONE);
}
@Test
@EnabledOnJre(JRE.JAVA_22)
void currentJavaVersionTwentyTwo() {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY_TWO);
}
}