dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

refactor parameter on consumer url logic code

Open cheese8 opened this issue 2 years ago • 1 comments

refactor parameter on consumer url logic code: #10312 1.using ParameterOnConsumerUrl, getParameterOnConsumerUrl and hasParameterOnConsumerUrl to refactor the multi-places similar code 2. using final

cheese8 avatar Jul 13 '22 06:07 cheese8

Codecov Report

Merging #10313 (f25cb82) into 3.0 (651d4df) will increase coverage by 0.05%. The diff coverage is 82.60%.

@@             Coverage Diff              @@
##                3.0   #10313      +/-   ##
============================================
+ Coverage     65.68%   65.73%   +0.05%     
+ Complexity      319      318       -1     
============================================
  Files          1233     1233              
  Lines         53729    53739      +10     
  Branches       8121     8116       -5     
============================================
+ Hits          35291    35327      +36     
+ Misses        14592    14581      -11     
+ Partials       3846     3831      -15     
Impacted Files Coverage Δ
...ache/dubbo/registry/client/InstanceAddressURL.java 58.51% <82.60%> (+6.89%) :arrow_up:
.../apache/dubbo/rpc/filter/ProfilerServerFilter.java 62.85% <0.00%> (-20.00%) :arrow_down:
...bo/rpc/protocol/dubbo/DecodeableRpcInvocation.java 70.19% <0.00%> (-10.58%) :arrow_down:
...ng/exchange/support/header/HeartbeatTimerTask.java 70.00% <0.00%> (-5.00%) :arrow_down:
.../remoting/transport/netty4/NettyServerHandler.java 58.13% <0.00%> (-4.66%) :arrow_down:
.../java/org/apache/dubbo/rpc/model/ServiceModel.java 55.17% <0.00%> (-4.48%) :arrow_down:
...apache/dubbo/remoting/transport/AbstractCodec.java 84.84% <0.00%> (-4.05%) :arrow_down:
.../apache/dubbo/rpc/protocol/injvm/InjvmInvoker.java 63.56% <0.00%> (-3.88%) :arrow_down:
.../remoting/transport/netty4/NettyClientHandler.java 82.75% <0.00%> (-3.45%) :arrow_down:
...pache/dubbo/rpc/model/ModuleServiceRepository.java 64.76% <0.00%> (-3.28%) :arrow_down:
... and 44 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

codecov-commenter avatar Jul 13 '22 07:07 codecov-commenter

Thanks for the contribution.

This code seems to be more maintenance-friendly but harder to read, considering the fact that the logic in InstanceAddressURL is very unlikely to be changed in the future. I would prefer to keep the current code unchanged.

chickenlj avatar Sep 09 '22 03:09 chickenlj