This is an automated email from the ASF dual-hosted git repository.
jerrick pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new cd7ba29 fix #2557 Update ConfigUtils.java (#2562)
cd7ba29 is described below
commit cd7ba294b22a9b392030fe5c6ee06247fc7868c1
Author: 隔壁老王 <[email protected]>
AuthorDate: Wed Sep 26 17:09:45 2018 +0800
fix #2557 Update ConfigUtils.java (#2562)
---
.../src/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 f112ec2..436cf8f 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 class ConfigUtils {
*/
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 class ConfigUtils {
return timeout;
}
-}
\ No newline at end of file
+}