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

optimize: opt the logic of SpringProxyUtils.findTargetClass(#3155) #3156

Merged
merged 9 commits into from
Jan 17, 2021
Merged

optimize: opt the logic of SpringProxyUtils.findTargetClass(#3155) #3156

merged 9 commits into from
Jan 17, 2021

Conversation

squallliu
Copy link
Contributor

@squallliu squallliu commented Sep 28, 2020

Ⅰ. Describe what this PR did

  1. 修正 SpringProxyUtils.findTargetClass 存在嵌套代理获取的 class 依旧是代理的问题
  2. 优化逻辑,不使用反射

Ⅱ. Does this pull request fix one issue?

fixes #3155

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2020

Codecov Report

Merging #3156 into develop will decrease coverage by 0.11%.
The diff coverage is 16.66%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3156      +/-   ##
=============================================
- Coverage      50.37%   50.26%   -0.12%     
+ Complexity      3116     3112       -4     
=============================================
  Files            594      594              
  Lines          19625    19591      -34     
  Branches        2438     2390      -48     
=============================================
- Hits            9887     9847      -40     
+ Misses          8744     8725      -19     
- Partials         994     1019      +25     
Impacted Files Coverage Δ Complexity Δ
...in/java/io/seata/spring/util/SpringProxyUtils.java 3.84% <16.66%> (+2.15%) 3.00 <1.00> (ø)
...obuf/convertor/BranchRegisterRequestConvertor.java 90.47% <0.00%> (-9.53%) 3.00% <0.00%> (ø%)
...otobuf/convertor/BranchReportRequestConvertor.java 90.90% <0.00%> (-9.10%) 3.00% <0.00%> (ø%)
...obuf/convertor/BranchRollbackRequestConvertor.java 92.00% <0.00%> (-8.00%) 3.00% <0.00%> (ø%)
...otobuf/convertor/GlobalBeginResponseConvertor.java 92.59% <0.00%> (-7.41%) 3.00% <0.00%> (ø%)
...otobuf/convertor/GlobalCommitRequestConvertor.java 93.75% <0.00%> (-6.25%) 3.00% <0.00%> (ø%)
...otobuf/convertor/GlobalStatusRequestConvertor.java 93.75% <0.00%> (-6.25%) 3.00% <0.00%> (ø%)
...obuf/convertor/GlobalRollbackRequestConvertor.java 93.75% <0.00%> (-6.25%) 3.00% <0.00%> (ø%)
...protobuf/convertor/RegisterTMRequestConvertor.java 94.73% <0.00%> (-5.27%) 3.00% <0.00%> (ø%)
...protobuf/convertor/RegisterRMRequestConvertor.java 90.47% <0.00%> (-4.77%) 3.00% <0.00%> (ø%)
... and 28 more

@funky-eyes funky-eyes added first-time contributor first-time contributor module/spring spring module labels Sep 28, 2020
@funky-eyes
Copy link
Contributor

please standardize the title

@squallliu squallliu changed the title optimize(#3155) optimize: opt the logic of SpringProxyUtils.findTargetClass Sep 28, 2020
@squallliu squallliu changed the title optimize: opt the logic of SpringProxyUtils.findTargetClass optimize: opt the logic of SpringProxyUtils.findTargetClass(#3155) Sep 28, 2020
@wangliang181230 wangliang181230 added this to the 1.5.0 milestone Oct 29, 2020
@codecov-io
Copy link

codecov-io commented Nov 22, 2020

Codecov Report

Merging #3156 (5dfb63c) into develop (23a407e) will decrease coverage by 0.16%.
The diff coverage is 16.66%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3156      +/-   ##
=============================================
- Coverage      51.11%   50.95%   -0.17%     
+ Complexity      3297     3289       -8     
=============================================
  Files            614      614              
  Lines          20125    20141      +16     
  Branches        2514     2519       +5     
=============================================
- Hits           10287    10262      -25     
- Misses          8806     8851      +45     
+ Partials        1032     1028       -4     
Impacted Files Coverage Δ Complexity Δ
...in/java/io/seata/spring/util/SpringProxyUtils.java 3.84% <16.66%> (+2.15%) 3.00 <1.00> (ø)
.../src/main/java/io/seata/core/rpc/ShutdownHook.java 0.00% <0.00%> (-82.86%) 0.00% <0.00%> (-8.00%)
...in/java/io/seata/server/session/GlobalSession.java 83.18% <0.00%> (-0.46%) 71.00% <0.00%> (ø%)
...o/seata/server/coordinator/DefaultCoordinator.java 55.15% <0.00%> (+0.51%) 29.00% <0.00%> (+1.00%)
.../java/io/seata/server/coordinator/DefaultCore.java 49.39% <0.00%> (+1.82%) 23.00% <0.00%> (-1.00%) ⬆️

Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes merged commit e9ff5f9 into apache:develop Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-time contributor first-time contributor module/spring spring module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SpringProxyUtils.findTargetClass 存在嵌套代理获取的 class 依旧是代理的问题
6 participants