aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/poifs
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-10-20 01:54:56 +0000
committerJaven O'Neal <onealj@apache.org>2016-10-20 01:54:56 +0000
commitf14210b101b707b4ce09d87a1d0720ac0c696caf (patch)
tree2d8144fdbf643e9deb5a98279e2e8a8200921c07 /src/testcases/org/apache/poi/poifs
parentecef10cb7b381f843e6d94ea97e91bcec385e2c8 (diff)
downloadpoi-f14210b101b707b4ce09d87a1d0720ac0c696caf.tar.gz
poi-f14210b101b707b4ce09d87a1d0720ac0c696caf.zip
Eclipse automated refactor/cleanup: convert for loops to for-each loops
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765736 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/poifs')
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java5
-rw-r--r--src/testcases/org/apache/poi/poifs/storage/TestSmallDocumentBlock.java5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java b/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
index 6aebd7488d..bbe1e39f6f 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
@@ -340,10 +340,9 @@ public final class TestDocumentInputStream extends TestCase {
while (stream.available() >= buffer.length)
{
assertEquals(_buffer_size, stream.read(buffer));
- for (int j = 0; j < buffer.length; j++)
- {
+ for (byte data : buffer) {
assertEquals("in main loop, byte " + offset,
- _workbook_data[ offset ], buffer[ j ]);
+ _workbook_data[ offset ], data);
offset++;
}
assertEquals("offset " + offset, _workbook_size - offset,
diff --git a/src/testcases/org/apache/poi/poifs/storage/TestSmallDocumentBlock.java b/src/testcases/org/apache/poi/poifs/storage/TestSmallDocumentBlock.java
index a2ff6ceb1f..2d6ef1845c 100644
--- a/src/testcases/org/apache/poi/poifs/storage/TestSmallDocumentBlock.java
+++ b/src/testcases/org/apache/poi/poifs/storage/TestSmallDocumentBlock.java
@@ -213,10 +213,9 @@ public final class TestSmallDocumentBlock extends TestCase {
assertEquals("testing block at offset " + offset, 64,
out_data.length);
- for (int j = 0; j < out_data.length; j++)
- {
+ for (byte b : out_data) {
assertEquals("testing byte at offset " + offset,
- data[ offset ], out_data[ j ]);
+ data[ offset ], b);
offset++;
}
}