Repository navigation
Update ConfigUtils.java - #2562
Conversation
add scene judgement in windows environment Fix 2557
| Properties properties = new Properties(); | ||
| if (fileName.startsWith("/")) { | ||
| //add scene judgement in windows environment Fix 2557 | ||
| if (fileName.startsWith("/")||fileName.matches("^[A-z]:\\\\\\S+$")) { |
There was a problem hiding this comment.
-
Would u pls format your code?
-
Pls use doc as this:
// add scene...
Remember the space. -
pls add some unit test.
There was a problem hiding this comment.
1.sorry,I do not format my code,I will do it.
2.ok.I will get the space.
3. the testcase(com.alibaba.dubbo.config.AbstractInterfaceConfigTest#checkApplication1) existed before
Codecov Report
@@ Coverage Diff @@
## master #2562 +/- ##
============================================
- Coverage 54.96% 54.93% -0.04%
+ Complexity 5278 5275 -3
============================================
Files 573 573
Lines 25517 25517
Branches 4531 4531
============================================
- Hits 14026 14018 -8
- Misses 9390 9392 +2
- Partials 2101 2107 +6
Continue to review full report at Codecov.
|
formate the code add the space
SuperDubbo
left a comment
There was a problem hiding this comment.
I have do all as you list.@carryxyh
| Properties properties = new Properties(); | ||
| if (fileName.startsWith("/")) { | ||
| //add scene judgement in windows environment Fix 2557 | ||
| if (fileName.startsWith("/")||fileName.matches("^[A-z]:\\\\\\S+$")) { |
There was a problem hiding this comment.
1.sorry,I do not format my code,I will do it.
2.ok.I will get the space.
3. the testcase(com.alibaba.dubbo.config.AbstractInterfaceConfigTest#checkApplication1) existed before
|
@SuperDubbo |
add scene judgement in windows environment Fix 2557
What is the purpose of the change
fix #2557
Brief changelog
add scene judgement in windows environment
Verifying this change
When run the testcase(com.alibaba.dubbo.config.AbstractInterfaceConfigTest#checkApplication1) in windows environment,It will be wrong.
So It should add scene judgement in windows environment(org.apache.dubbo.common.utils.ConfigUtils#loadProperties(java.lang.String, boolean, boolean),Line 220).
if (fileName.startsWith("/")) {
change to
if (fileName.startsWith("/")||fileName.matches("^[A-z]:\\\S+$")) {
the testcase (com.alibaba.dubbo.config.AbstractInterfaceConfigTest#checkApplication1) will go well.
Follow this checklist to help us incorporate your contribution quickly and easily:
[Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.mvn clean install -DskipTests&mvn clean test-compile failsafe:integration-testto make sure unit-test and integration-test pass.