From 22badcef272f4c61313b2ea1e520f88f9c65a400 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 16 Jul 2022 18:08:50 +0000 Subject: [github-342] Use foreach. Thanks to XenoAmess. This closes #342 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902778 13f79535-47bb-0310-9956-ffa450edef68 --- poi/src/test/java/org/apache/poi/ss/util/TestCellRangeUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'poi/src/test') diff --git a/poi/src/test/java/org/apache/poi/ss/util/TestCellRangeUtil.java b/poi/src/test/java/org/apache/poi/ss/util/TestCellRangeUtil.java index 5b402a3bcd..12b0ffcf5a 100644 --- a/poi/src/test/java/org/apache/poi/ss/util/TestCellRangeUtil.java +++ b/poi/src/test/java/org/apache/poi/ss/util/TestCellRangeUtil.java @@ -78,8 +78,8 @@ final class TestCellRangeUtil { private static Set getCellAddresses(CellRangeAddress[] ranges) { final Set set = new HashSet<>(); for (final CellRangeAddress range : ranges) { - for (Iterator iter = range.iterator(); iter.hasNext(); ) { - set.add(iter.next()); + for (CellAddress cellAddress : range) { + set.add(cellAddress); } } return set; -- cgit v1.2.3