diecui1202 closed pull request #2562: Update ConfigUtils.java
URL: https://github.com/apache/incubator-dubbo/pull/2562
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
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 f112ec2576..436cf8f42e 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
+}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services