aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2019-09-14 09:54:11 +0000
committerPJ Fanning <fanningpj@apache.org>2019-09-14 09:54:11 +0000
commitdc6a4a99e2d077ff9c9a343e218070d4df14d48d (patch)
tree2f0a8a12f9c20dcaa8e7e1b7da168c0dcf44782f /src/testcases/org/apache/poi
parent8a9af96f953d1536a60c8bb667da91b4b5b5dc20 (diff)
downloadpoi-dc6a4a99e2d077ff9c9a343e218070d4df14d48d.tar.gz
poi-dc6a4a99e2d077ff9c9a343e218070d4df14d48d.zip
try to avoid casting to int
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1866933 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi')
-rw-r--r--src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java b/src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java
index 54673cce39..377f78d82a 100644
--- a/src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java
+++ b/src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java
@@ -20,9 +20,10 @@ package org.apache.poi.ss.util;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertArrayEquals;
+
+import java.util.Iterator;
import java.util.Set;
import java.util.HashSet;
-import org.apache.commons.collections4.IteratorUtils;
/**
* Tests CellRangeUtil.
@@ -76,7 +77,9 @@ public final class TestCellRangeUtil {
private static Set<CellAddress> getCellAddresses(CellRangeAddress[] ranges) {
final Set<CellAddress> set = new HashSet<>();
for (final CellRangeAddress range : ranges) {
- set.addAll(IteratorUtils.toList(range.iterator()));
+ for (Iterator<CellAddress> iter = range.iterator(); iter.hasNext(); ) {
+ set.add(iter.next());
+ }
}
return set;
}