From: PJ Fanning Date: Fri, 15 Jul 2022 22:57:34 +0000 (+0000) Subject: [github-350] simplify cloneCellProperties. Thanks to XenoAmess. This closes #350 X-Git-Tag: REL_5_2_3~182 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dbd078af9cb15f542b1df87c85a84a53b3308ec9;p=poi.git [github-350] simplify cloneCellProperties. Thanks to XenoAmess. This closes #350 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902758 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi/src/main/java/org/apache/poi/ss/util/PropertyTemplate.java b/poi/src/main/java/org/apache/poi/ss/util/PropertyTemplate.java index cf789d7450..c9aa9e835e 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/PropertyTemplate.java +++ b/poi/src/main/java/org/apache/poi/ss/util/PropertyTemplate.java @@ -83,11 +83,7 @@ public final class PropertyTemplate { } private static Map cloneCellProperties(Map properties) { - Map newProperties = new HashMap<>(); - for(Map.Entry entry : properties.entrySet()) { - newProperties.put(entry.getKey(), entry.getValue()); - } - return newProperties; + return new HashMap<>(properties); } /**