Skip to content

Commit

Permalink
Merge branch '2.5.x'
Browse files Browse the repository at this point in the history
Closes gh-27416
  • Loading branch information
wilkinsona committed Jul 20, 2021
2 parents 556d568 + c2819d6 commit a05da3a
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-2020 the original author or authors.
* Copyright 2012-2021 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 All @@ -16,6 +16,7 @@

package org.springframework.boot.system;

import java.io.Console;
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -77,7 +78,12 @@ public enum JavaVersion {
/**
* Java 16.
*/
SIXTEEN("16", Stream.class, "toList");
SIXTEEN("16", Stream.class, "toList"),

/**
* Java 17.
*/
SEVENTEEN("17", Console.class, "charset");

private final String name;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 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 @@ -133,4 +133,10 @@ void currentJavaVersionSixteen() {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.SIXTEEN);
}

@Test
@EnabledOnJre(JRE.JAVA_17)
void currentJavaVersionSeventeen() {
assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.SEVENTEEN);
}

}

0 comments on commit a05da3a

Please sign in to comment.