From 7f36fb155df3b9b30480bbc5650a80bf98462e7c Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sat, 24 Sep 2022 00:00:29 +0900 Subject: [PATCH] Polish JavaVersionTests.currentJavaVersionNineteen() See gh-32489 --- .../org/springframework/boot/system/JavaVersionTests.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/system/JavaVersionTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/system/JavaVersionTests.java index d3ca167e9d..752fd8c7ef 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/system/JavaVersionTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/system/JavaVersionTests.java @@ -17,7 +17,6 @@ package org.springframework.boot.system; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledIf; import org.junit.jupiter.api.condition.EnabledOnJre; import org.junit.jupiter.api.condition.JRE; @@ -93,13 +92,9 @@ class JavaVersionTests { } @Test - @EnabledIf("java19") + @EnabledOnJre(JRE.JAVA_19) void currentJavaVersionNineteen() { assertThat(JavaVersion.getJavaVersion()).isEqualTo(JavaVersion.NINETEEN); } - static boolean java19() { - return "19".equals(System.getProperty("java.version")); - } - }