]> source.dussan.org Git - poi.git/commitdiff
[github-350] simplify cloneCellProperties. Thanks to XenoAmess. This closes #350
authorPJ Fanning <fanningpj@apache.org>
Fri, 15 Jul 2022 22:57:34 +0000 (22:57 +0000)
committerPJ Fanning <fanningpj@apache.org>
Fri, 15 Jul 2022 22:57:34 +0000 (22:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902758 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/ss/util/PropertyTemplate.java

index cf789d7450172e2eda8aac75f5a10c0bc290bcbc..c9aa9e835e10e0e3121a159fd2cdef7db2f698e2 100644 (file)
@@ -83,11 +83,7 @@ public final class PropertyTemplate {
     }
 
     private static Map<String, Object> cloneCellProperties(Map<String, Object> properties) {
-        Map<String, Object> newProperties = new HashMap<>();
-        for(Map.Entry<String, Object> entry : properties.entrySet()) {
-            newProperties.put(entry.getKey(), entry.getValue());
-        }
-        return newProperties;
+        return new HashMap<>(properties);
     }
 
     /**