Optimize Logic Code to Reduce Code Complexity
Comment From: pivotal-cla
@CodeMan-cmd Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-cla
@CodeMan-cmd Thank you for signing the Contributor License Agreement!
Comment From: snicoll
@CodeMan-cmd I am not sure what you mean by "reduce code complexity" but this check is there for a reason. Can you clarify?
Comment From: CodeMan-cmd
@CodeMan-cmd I am not sure what you mean by "reduce code complexity" but this check is there for a reason. Can you clarify?
This judgment is invalid, personally, I think some unused codes can be cleared out.
Comment From: snicoll
Why do you think it is invalid?
Comment From: CodeMan-cmd
Why do you think it is invalid?
if (beanName != null && !strVal.equals(beanName)) {} this beanNmae
Comment From: CodeMan-cmd
Why do you think it is invalid?
I thought it was defensive programming at first. think about it, think it should be a bug.
Comment From: snicoll
It's checking that the suggested component name matches the current bean name, if any. It isn't a bug and is defensive in case of misconfiguration indeed.