]> source.dussan.org Git - poi.git/commitdiff
bug 61730: remove asSet function from unit test
authorJaven O'Neal <onealj@apache.org>
Tue, 7 Nov 2017 07:26:48 +0000 (07:26 +0000)
committerJaven O'Neal <onealj@apache.org>
Tue, 7 Nov 2017 07:26:48 +0000 (07:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814462 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java

index 786fdaaaf5e471b7e79e8570d991f4d3cf9e5594..3fbf3dd4875c21f5bcbaf9b1a848ce4c0ab4c9a0 100644 (file)
@@ -78,15 +78,11 @@ public final class TestCellRangeUtil {
     private static Set<CellAddress> getCellAddresses(CellRangeAddress[] ranges) {
         final Set<CellAddress> set = new HashSet<>();
         for (final CellRangeAddress range : ranges) {
-            set.addAll(asSet(range.iterator()));
+            set.addAll(IteratorUtils.toList(range.iterator()));
         }
         return set;
     }
             
-    private static <T> Set<T> asSet(Iterator<T> iterator) {
-        return new HashSet<T>(IteratorUtils.toList(iterator));
-    }
-
     private static <T> T[] asArray(T...ts) {
         return ts;
     }