diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java b/dubbo-common/src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java index d695b46d169..487cc74ba5c 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java @@ -805,8 +805,10 @@ private HashedWheelTimeout pollTimeout() { return head; } } - + + private static final boolean IS_OS_WINDOWS = System.getProperty("os.name", "").toLowerCase(Locale.US).contains("win"); + private boolean isWindows() { - return System.getProperty("os.name", "").toLowerCase(Locale.US).contains("win"); + return IS_OS_WINDOWS; } }