Skip to content

Commit

Permalink
Add TWENTY_TWO to JavaVersion enum
Browse files Browse the repository at this point in the history
Closes gh-39825
  • Loading branch information
wilkinsona committed Mar 4, 2024
1 parent 8efdc1e commit e8acbc1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -109,4 +109,10 @@ void currentJavaVersionTwentyOne() {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY_ONE);
}

@Test
@EnabledOnJre(JRE.JAVA_22)
void currentJavaVersionTwentyTwo() {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.TWENTY_TWO);
}

}

0 comments on commit e8acbc1

Please sign in to comment.