diff options
author | Axel Howind <axh@apache.org> | 2019-11-17 08:45:03 +0000 |
---|---|---|
committer | Axel Howind <axh@apache.org> | 2019-11-17 08:45:03 +0000 |
commit | 4f8879f8ef4f52a9d22c88718d58dae832706cb4 (patch) | |
tree | 58e4554eeeb3cded4a498b5bf6755d875d9f090d /src/java/org/apache/poi/ss/util/CellRangeUtil.java | |
parent | 10e0e3d108bc763f27db056c39285d24c6f068ab (diff) | |
download | poi-4f8879f8ef4f52a9d22c88718d58dae832706cb4.tar.gz poi-4f8879f8ef4f52a9d22c88718d58dae832706cb4.zip |
use zero size arg to toArray(), use Collection.addAll() (#63805, second patch)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1869919 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ss/util/CellRangeUtil.java')
-rw-r--r-- | src/java/org/apache/poi/ss/util/CellRangeUtil.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/java/org/apache/poi/ss/util/CellRangeUtil.java b/src/java/org/apache/poi/ss/util/CellRangeUtil.java index 8c40a4d63a..3b8b5251d4 100644 --- a/src/java/org/apache/poi/ss/util/CellRangeUtil.java +++ b/src/java/org/apache/poi/ss/util/CellRangeUtil.java @@ -18,6 +18,7 @@ package org.apache.poi.ss.util; import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** @@ -173,9 +174,7 @@ public final class CellRangeUtil { } private static List<CellRangeAddress> toList(CellRangeAddress[] temp) { List<CellRangeAddress> result = new ArrayList<>(temp.length); - for (CellRangeAddress range : temp) { - result.add(range); - } + Collections.addAll(result, temp); return result; } |