Skip to content

Commit

Permalink
Revert "Optimize code to remove useless objects (apache#7582)"
Browse files Browse the repository at this point in the history
This reverts commit d625208
  • Loading branch information
horizonzy committed May 9, 2021
1 parent f29663b commit 08e6d76
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,15 @@ public void setAttachmentIfAbsent(String key, String value) {
attachments.put(key, value);
}
}

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

public void addAttachmentsIfAbsent(Map<String, String> attachments) {
Expand Down

0 comments on commit 08e6d76

Please sign in to comment.