You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refundant nullcheck of value known to non-null #1231
There are some "refundant nullcheck of value known to non-null" suggests can be found by findBugs plugin, maybe we should handle these to make the code cleaner
example : CacheFilter#invoke , check the (cache != null) twice
Activity
ralf0131 commentedon Jan 18, 2018
Hi, could you provide more details (file name, line number for example)?
hqq2023623 commentedon Jan 18, 2018
type1 : check null more than one time
FutureFilter#fireInvokeCallback
line 110 , onInvokeMethod is checked by line 107

the same as FutureFilter#fireReturnCallback

### and FutureFilter#fireThrowCallbacktype2 : checked by context
MergeableClusterInvoker#invoke ,at line 144

returnType.getMethod() will not return nullJavaBeanDescriptor#getEnumPropertyName , at line 141

if getProperty() return null , then toString() may throw NPE before the result == null checkhqq2023623 commentedon Jan 18, 2018
type3 : call method that never return null
###ExtensionLoader#hasExtension , at line 333


ExtensionLoader#getExtensionClass() never return null
hqq2023623 commentedon Jan 18, 2018
type4 : check by both caller and self
caller : RegistryDirectory#notify , at line 207
self : RegistryDirectory#toRouters , at line 309
hqq2023623 commentedon Jan 19, 2018
@ralf0131
ralf0131 commentedon Jan 19, 2018
Hi @hqq2023623 Thanks for pointing out. It will be really appreciate if you can create a pull request~
fix apache#1231
chickenlj commentedon Jan 25, 2018
Thanks, i will review the PR laterly.
Merge pull request #1242, remove redundant null check.
Merge alibaba/dubbo/master to myself repo (#1)
Merge alibaba/dubbo/master to myself repo. (#2)
Merge alibaba/dubbo/master to myself repo (#4)
Merge pull request apache#1242, remove redundant null check.