From cd7ba294b22a9b392030fe5c6ee06247fc7868c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=94=E5=A3=81=E8=80=81=E7=8E=8B?= <269937035@qq.com> Date: Wed, 26 Sep 2018 17:09:45 +0800 Subject: [PATCH] fix #2557 Update ConfigUtils.java (#2562) --- .../main/java/org/apache/dubbo/common/utils/ConfigUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConfigUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConfigUtils.java index f112ec2576c..436cf8f42eb 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConfigUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConfigUtils.java @@ -217,7 +217,8 @@ public static Properties loadProperties(String fileName, boolean allowMultiFile) */ public static Properties loadProperties(String fileName, boolean allowMultiFile, boolean optional) { Properties properties = new Properties(); - if (fileName.startsWith("/")) { + // add scene judgement in windows environment Fix 2557 + if (fileName.startsWith("/") || fileName.matches("^[A-z]:\\\\\\S+$")) { try { FileInputStream input = new FileInputStream(fileName); try { @@ -328,4 +329,4 @@ public static int getServerShutdownTimeout() { return timeout; } -} \ No newline at end of file +}