-
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
@Service and @Reference Optimization #2655
Conversation
import com.alibaba.dubbo.config.ProviderConfig; | ||
import com.alibaba.dubbo.config.RegistryConfig; | ||
import com.alibaba.dubbo.config.ServiceConfig; | ||
import com.alibaba.dubbo.config.*; |
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.
Maybe you should use dubbo code style here ? you can found here : https://github.com/apache/incubator-dubbo/blob/master/codestyle/dubbo_codestyle_for_idea.xml
remove *
please.
import com.alibaba.dubbo.config.ModuleConfig; | ||
import com.alibaba.dubbo.config.MonitorConfig; | ||
import com.alibaba.dubbo.config.RegistryConfig; | ||
import com.alibaba.dubbo.config.*; |
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.
remove * please.
throws IllegalStateException { | ||
|
||
String interfaceName; | ||
if (!"".equals(service.interfaceName())) { |
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.
Use StringUtils.isNotEmpty
maybe better.
throws IllegalStateException { | ||
|
||
String interfaceName; | ||
if (!"".equals(reference.interfaceName())) { |
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.
Use StringUtils.isNotEmpty
maybe better.
} | ||
referenceBean.destroy(); | ||
} | ||
String referencedBeanName = buildReferencedBeanName(reference, injectedType); |
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.
Multiple services referencing the same field here will cause a bug, see: d8282fe
|
||
Class<?> referenceClass = field.getType(); | ||
@Override | ||
protected String buildInjectedObjectCacheKey(Reference reference, Object bean, String beanName, |
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.
Multiple services referencing the same field here will cause a bug, see: d8282fe
What is the purpose of the change