-
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
Fix method may be null, and NullPointerException will be thrown in MethodUtils(#7605) #7606
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7606 +/- ##
============================================
- Coverage 59.11% 59.10% -0.01%
- Complexity 528 530 +2
============================================
Files 1076 1076
Lines 43443 43434 -9
Branches 6346 6348 +2
============================================
- Hits 25681 25673 -8
- Misses 14917 14926 +9
+ Partials 2845 2835 -10 Continue to review full report at Codecov.
|
@@ -276,6 +276,10 @@ static Method findMethod(Class type, String methodName, Class<?>... parameterTyp | |||
Method method = findMethod(type, methodName, parameterTypes); | |||
T value = null; | |||
|
|||
if (method == null) { | |||
throw new IllegalStateException("method is 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.
how about make log more friendly?
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've done it
Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
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.
…thodUtils (apache#7606) * Fix method may be null, and NullPointerException will be thrown in MethodUtils(apache#7605) * Update by review Signed-off-by: xingrufei <xingrufei@sogou-inc.com> Co-authored-by: xingrufei <xingrufei@sogou-inc.com>
Fix method may be null, and NullPointerException will be thrown in MethodUtils
In this issue(#7605 ),Method may be null, and NullPointerException will be thrown in MethodUtils, this pr is to fix this issue, to avoid throwing NullPointerException in MethodUtils, thanks
[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.