Skip to content
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

Merged
merged 1 commit into from
Oct 18, 2018
Merged

Conversation

mercyblitz
Copy link
Contributor

What is the purpose of the change

@mercyblitz mercyblitz added this to the 2.6.5 milestone Oct 18, 2018
import com.alibaba.dubbo.config.ProviderConfig;
import com.alibaba.dubbo.config.RegistryConfig;
import com.alibaba.dubbo.config.ServiceConfig;
import com.alibaba.dubbo.config.*;
Copy link
Member

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.*;
Copy link
Member

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())) {
Copy link
Member

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())) {
Copy link
Member

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);
Copy link
Member

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,
Copy link
Member

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

@mercyblitz mercyblitz merged commit a874554 into apache:2.6.x Oct 18, 2018
@cvictory cvictory mentioned this pull request Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants