This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-logging.git
The following commit(s) were added to refs/heads/master by this push: new 79750f9 Use for-each loop in test 79750f9 is described below commit 79750f9a9b0df13d3b92190686a4f71bb9290e8a Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Wed Aug 14 09:07:02 2024 -0400 Use for-each loop in test --- .../java/org/apache/commons/logging/simple/CustomConfigTestCase.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java b/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java index 5e1a1ba..893eb95 100644 --- a/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java @@ -18,7 +18,6 @@ package org.apache.commons.logging.simple; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import junit.framework.Test; @@ -115,10 +114,8 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { // Check the actual log records against the expected ones protected void checkExpected() { final List<LogRecord> acts = ((DecoratedSimpleLog) log).getCache(); - final Iterator<LogRecord> exps = expected.iterator(); int n = 0; - while (exps.hasNext()) { - final LogRecord exp = exps.next(); + for (LogRecord exp : expected) { final LogRecord act = acts.get(n++); assertEquals("Row " + n + " type", exp.type, act.type); assertEquals("Row " + n + " message", exp.message, act.message);