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 code to remove useless objects #7582

Merged
merged 4 commits into from
Apr 21, 2021
Merged

Optimize code to remove useless objects #7582

merged 4 commits into from
Apr 21, 2021

Conversation

srchen1987
Copy link

Optimize code to remove useless objects

update before
public void addAttachments(Map<String, String> attachments) {
if (attachments == null) {
return;
}
if (this.attachments == null) {
this.attachments = new HashMap<String, String>();
}
this.attachments.putAll(attachments);
}

update after
public void addAttachments(Map<String, String> attachments) {
if (attachments == null) {
return;
}
if (this.attachments == null) {
this.attachments = attachments;
}else{
this.attachments.putAll(attachments);
}
}

@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@3e02287). Click here to learn what that means.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #7582   +/-   ##
=========================================
  Coverage          ?   59.01%           
  Complexity        ?      527           
=========================================
  Files             ?     1076           
  Lines             ?    43417           
  Branches          ?     6339           
=========================================
  Hits              ?    25621           
  Misses            ?    14951           
  Partials          ?     2845           
Impacted Files Coverage Δ Complexity Δ
...main/java/com/alibaba/dubbo/rpc/RpcInvocation.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)

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 3e02287...b412e6a. Read the comment docs.

Copy link
Contributor

@kevinw66 kevinw66 left a comment

Choose a reason for hiding this comment

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

duplicate with #7572

@srchen1987
Copy link
Author

duplicate with #7572

Deadlock? That version because I wrote comments, this version removed the comments. The previous code is meaningless and will not be submitted any more

@AlbumenJ AlbumenJ changed the title Srchen1987 patch 3 Optimize code to remove useless objects Apr 21, 2021
@AlbumenJ AlbumenJ merged commit d625208 into apache:master Apr 21, 2021
horizonzy added a commit to horizonzy/dubbo that referenced this pull request May 9, 2021
AlbumenJ pushed a commit that referenced this pull request May 11, 2021
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