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

2.6.x Spring Event & Bugfix #2256

Closed
wants to merge 32 commits into from
Closed

2.6.x Spring Event & Bugfix #2256

wants to merge 32 commits into from

Conversation

mercyblitz
Copy link
Contributor

@mercyblitz mercyblitz commented Aug 14, 2018

What is the purpose of the change

New Features

Enhancement

Fixed Bugs

mercyblitz and others added 27 commits November 6, 2017 10:29
Remove invalid JavaDoc
@mercyblitz mercyblitz added this to the 2.6.4 milestone Aug 14, 2018
@mercyblitz mercyblitz closed this Aug 14, 2018
@mercyblitz mercyblitz reopened this Aug 14, 2018
@mercyblitz
Copy link
Contributor Author

Please focus on code review since those commits have some break update.

@codecov-io
Copy link

codecov-io commented Aug 14, 2018

Codecov Report

Merging #2256 into 2.6.x will decrease coverage by 0.1%.
The diff coverage is 91.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##              2.6.x    #2256      +/-   ##
============================================
- Coverage     47.32%   47.21%   -0.11%     
+ Complexity     4264     4263       -1     
============================================
  Files           557      558       +1     
  Lines         24397    24352      -45     
  Branches       4342     4324      -18     
============================================
- Hits          11546    11499      -47     
- Misses        11048    11071      +23     
+ Partials       1803     1782      -21
Impacted Files Coverage Δ Complexity Δ
...ans/factory/annotation/ServiceBeanNameBuilder.java 100% <100%> (ø) 12 <12> (?)
...a/com/alibaba/dubbo/config/spring/ServiceBean.java 55.86% <100%> (+2.92%) 45 <4> (+4) ⬆️
...g/context/properties/DefaultDubboConfigBinder.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...annotation/ServiceAnnotationBeanPostProcessor.java 83.08% <100%> (-1.74%) 31 <1> (-3)
...nnotation/AbstractAnnotationConfigBeanBuilder.java 93.33% <100%> (ø) 9 <0> (ø) ⬇️
...ontext/annotation/DubboConfigBindingRegistrar.java 92.72% <100%> (ø) 15 <6> (ø) ⬇️
...spring/context/event/ServiceBeanExportedEvent.java 100% <100%> (ø) 2 <2> (?)
...baba/dubbo/config/spring/util/AnnotationUtils.java 61.11% <44.44%> (-16.67%) 9 <4> (+4)
...notation/ReferenceAnnotationBeanPostProcessor.java 98.59% <98.33%> (+21.31%) 25 <24> (+1) ⬆️
.../spring/schema/AnnotationBeanDefinitionParser.java 9.09% <0%> (-81.82%) 1% <0%> (-3%)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbfcb41...c0928d8. Read the comment docs.

import com.alibaba.dubbo.config.ProviderConfig;
import com.alibaba.dubbo.config.RegistryConfig;
import com.alibaba.dubbo.config.ServiceConfig;
import com.alibaba.dubbo.config.*;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure not add import *

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it requires change IDEA Template

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationListener;
import org.springframework.context.*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure not add import * , same as @diecui1202 said.

/**
* Dubbo {@link Service @Service} Bean Builder
*
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@author should be removed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

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 com.alibaba.dubbo.common.utils.StringUtils#isNotEmpty more 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 com.alibaba.dubbo.common.utils.StringUtils#isNotEmpty more better ?

Assert.assertEquals(true, referenceBean.isGeneric());
Assert.assertEquals(true, referenceBean.isInjvm());
Assert.assertEquals(false, referenceBean.isCheck());
Assert.assertEquals(null, referenceBean.isInit());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#line 53 init = false, Assert.assertEquals(null, referenceBean.isInit()) should be Assert.assertEquals(false, referenceBean.isInit()) ?

/**
* {@link Service} Bean
*
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@author should be removed ?

Copy link
Member

@zonghaishang zonghaishang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More confused, too many commits are difficult to find bug fix code for both service and reference in the same project

Copy link
Member

@zonghaishang zonghaishang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.com.alibaba.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor#findFieldAnnotationMetadata and findMethodAnnotationMetadata will cache all the fields or methods that have been annotated with dubbo. The application startup will not be used again.

  1. Dubbo's referenceConfig has been added proxy (spi), you add a another layer of proxy (jdk) here, just solve the same jvm refer to consume the service in advance, this is no problem, after the success of the references should be removing proxy

@diecui1202
Copy link

@mercyblitz Pls. check the ci failure.

@diecui1202 diecui1202 modified the milestones: 2.6.4, 2.6.5 Sep 14, 2018
@mercyblitz mercyblitz closed this Oct 15, 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.

None yet

5 participants