From d87dd1221eb23732f4400cb60de725765539a274 Mon Sep 17 00:00:00 2001 From: Ceki Gulcu Date: Sun, 26 Nov 2023 13:30:16 +0100 Subject: [PATCH] further support for Virtual threads, issues 737 Signed-off-by: Ceki Gulcu --- .../src/test/java/ch/qos/logback/classic/util/EnvUtilTest.java | 1 - .../java/ch/qos/logback/core/util/ExecutorServiceUtil.java | 2 +- .../src/test/java/ch/qos/logback/core/util/EnvUtilTest.java | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/util/EnvUtilTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/util/EnvUtilTest.java index 53941f4bd5..4df50a2999 100644 --- a/logback-classic/src/test/java/ch/qos/logback/classic/util/EnvUtilTest.java +++ b/logback-classic/src/test/java/ch/qos/logback/classic/util/EnvUtilTest.java @@ -26,5 +26,4 @@ public void versionTest() { - } diff --git a/logback-core/src/main/java/ch/qos/logback/core/util/ExecutorServiceUtil.java b/logback-core/src/main/java/ch/qos/logback/core/util/ExecutorServiceUtil.java index 0ffb6464a9..1534904069 100755 --- a/logback-core/src/main/java/ch/qos/logback/core/util/ExecutorServiceUtil.java +++ b/logback-core/src/main/java/ch/qos/logback/core/util/ExecutorServiceUtil.java @@ -45,7 +45,7 @@ public class ExecutorServiceUtil { private final ThreadFactory defaultFactory = makeThreadFactory(); /** - * A thread factory which may be a virtual thread factory if available. + * A thread factory which may be a virtual thread factory the JDK supports it. * * @return */ diff --git a/logback-core/src/test/java/ch/qos/logback/core/util/EnvUtilTest.java b/logback-core/src/test/java/ch/qos/logback/core/util/EnvUtilTest.java index 55068d0c9e..a99d654f15 100644 --- a/logback-core/src/test/java/ch/qos/logback/core/util/EnvUtilTest.java +++ b/logback-core/src/test/java/ch/qos/logback/core/util/EnvUtilTest.java @@ -39,8 +39,11 @@ public void jdkVersion() { Assertions.assertEquals(9, EnvUtil.getJDKVersion("9EA")); Assertions.assertEquals(9, EnvUtil.getJDKVersion("9.0.1")); Assertions.assertEquals(18, EnvUtil.getJDKVersion("18.3+xx")); + Assertions.assertEquals(21, EnvUtil.getJDKVersion("21.0.1")); } + + @Test public void testJava1_4() { System.setProperty("java.version", "1.4.xx");