Skip to content

Commit b17739c

Browse files
committed
Use for each loop.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1811345 13f79535-47bb-0310-9956-ffa450edef68
1 parent ce44cfa commit b17739c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/test/java/org/apache/commons/codec/digest/PureJavaCrc32Test.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ private void checkOnBytes(final byte[] bytes, final boolean print) {
6969
ours.reset();
7070
checkSame();
7171

72-
for (int i = 0; i < bytes.length; i++) {
73-
ours.update(bytes[i]);
74-
theirs.update(bytes[i]);
72+
for (byte b : bytes) {
73+
ours.update(b);
74+
theirs.update(b);
7575
checkSame();
7676
}
7777

@@ -347,11 +347,11 @@ public void run() {
347347
}
348348
}
349349

350-
for(int i = 0; i < threads.length; i++) {
351-
threads[i].start();
350+
for (Thread thread : threads) {
351+
thread.start();
352352
}
353-
for(int i = 0; i < threads.length; i++) {
354-
threads[i].join();
353+
for (Thread thread : threads) {
354+
thread.join();
355355
}
356356

357357
final long expected = results[0].value;

0 commit comments

Comments
 (0)