-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dubbo-4218] Fix NPE when the TagRouterRule addresses config is null (#4218) #4236
Conversation
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why import *?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import java.util.*; | |
import java.util.*; |
fix it
assert tagRouterRule.getTagNames().contains("tag4"); | ||
// assert addresses | ||
assert tagRouterRule.getAddresses().contains("30.5.120.37:20880"); | ||
assert tagRouterRule.getTagnameToAddresses().get("tag1")==null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert tagRouterRule.getAddresses().size==1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I add it
Codecov Report
@@ Coverage Diff @@
## master #4236 +/- ##
============================================
- Coverage 63.01% 62.92% -0.09%
- Complexity 505 506 +1
============================================
Files 769 769
Lines 33058 33061 +3
Branches 5217 5217
============================================
- Hits 20830 20804 -26
- Misses 9823 9853 +30
+ Partials 2405 2404 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What is the purpose of the change
Fix NPE when the TagRouterRule addresses config is null #4218
Brief changelog
Fix NPE when the TagRouterRule addresses config is null #4218
Verifying this change
XXXXX
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=false
&mvn clean test-compile failsafe:integration-test
to make sure unit-test and integration-test pass.