Skip to content

@Service and @Reference Optimization#2655

Merged
mercyblitz merged 1 commit intoapache:2.6.xfrom
mercyblitz:2.6.5
Oct 18, 2018
Merged

@Service and @Reference Optimization#2655
mercyblitz merged 1 commit intoapache:2.6.xfrom
mercyblitz:2.6.5

Conversation

@mercyblitz
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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