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

[Dubbo-7375]fix url add repeatedly #7376

Merged
merged 4 commits into from
Mar 18, 2021
Merged

Conversation

kevinw66
Copy link
Contributor

What is the purpose of the change

For-#7375

@brucelwl
Copy link
Contributor

brucelwl commented Mar 16, 2021

优化parameters hashCode计算方式

For-#7375

private int parametersHashCode() {
        int h = 0;
        for (Map.Entry<String, String> next : parameters.entrySet()) {
            if (Constants.TIMESTAMP_KEY.equals(next.getKey())) {
                continue;
            }
            h += next.hashCode();
        }
        return h;
    }

@codecov-io
Copy link

codecov-io commented Mar 16, 2021

Codecov Report

Merging #7376 (2659217) into master (d009d0c) will decrease coverage by 0.08%.
The diff coverage is 88.88%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7376      +/-   ##
============================================
- Coverage     58.72%   58.64%   -0.09%     
+ Complexity      425      422       -3     
============================================
  Files          1043     1043              
  Lines         42471    42512      +41     
  Branches       6212     6225      +13     
============================================
- Hits          24942    24932      -10     
- Misses        14748    14791      +43     
- Partials       2781     2789       +8     
Impacted Files Coverage Δ Complexity Δ
...mon/src/main/java/org/apache/dubbo/common/URL.java 50.43% <88.88%> (+0.37%) 0.00 <0.00> (ø)
.../java/org/apache/dubbo/qos/command/impl/Ready.java 3.33% <0.00%> (-46.67%) 0.00% <0.00%> (ø%)
...in/java/org/apache/dubbo/common/utils/JVMUtil.java 81.13% <0.00%> (-11.33%) 0.00% <0.00%> (ø%)
.../apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java 62.06% <0.00%> (-10.35%) 0.00% <0.00%> (ø%)
.../registry/multicast/MulticastServiceDiscovery.java 50.00% <0.00%> (-10.00%) 0.00% <0.00%> (ø%)
.../dubbo/remoting/transport/netty4/NettyChannel.java 63.36% <0.00%> (-3.97%) 0.00% <0.00%> (ø%)
...e/dubbo/registry/integration/RegistryProtocol.java 58.49% <0.00%> (-2.84%) 0.00% <0.00%> (ø%)
...dubbo/remoting/exchange/support/DefaultFuture.java 85.47% <0.00%> (-2.57%) 0.00% <0.00%> (ø%)
...ubbo/registry/client/ServiceDiscoveryRegistry.java 48.21% <0.00%> (-2.39%) 0.00% <0.00%> (ø%)
...he/dubbo/common/threadpool/ThreadlessExecutor.java 94.23% <0.00%> (-1.93%) 0.00% <0.00%> (ø%)
... and 24 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 d009d0c...2659217. Read the comment docs.

@AlbumenJ AlbumenJ merged commit c7cee8d into apache:master Mar 18, 2021
AlbumenJ added a commit to AlbumenJ/dubbo that referenced this pull request May 28, 2021
@kevinw66 kevinw66 deleted the issue-7375 branch July 12, 2021 02:38
vio-lin pushed a commit to vio-lin/incubator-dubbo that referenced this pull request Feb 22, 2023
* fix url add repeatedly

* use iterator to traverse parameters map

* remove unused import

* import static CommonConstants.TIMESTAMP_KEY

Co-authored-by: changye <changye@startdt.com>
(cherry picked from commit c7cee8d)

# Conflicts:
#	dubbo-common/src/main/java/org/apache/dubbo/common/URL.java
#	dubbo-common/src/test/java/org/apache/dubbo/common/URLTest.java
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

4 participants