aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss/formula
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-10-19 22:28:07 +0000
committerJaven O'Neal <onealj@apache.org>2016-10-19 22:28:07 +0000
commite88722f05275c24acb78a1442cd9c09a83cc6c00 (patch)
tree0d2d976122f3a13ea5eaf613569b0086e08d5975 /src/testcases/org/apache/poi/ss/formula
parent99125ee19173959d42553f78c9ea936648f904b8 (diff)
downloadpoi-e88722f05275c24acb78a1442cd9c09a83cc6c00.tar.gz
poi-e88722f05275c24acb78a1442cd9c09a83cc6c00.zip
Eclipse automated refactor/cleanup: convert for loops to for-each loops
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765728 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/formula')
-rw-r--r--src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java4
-rw-r--r--src/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java8
-rw-r--r--src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java4
3 files changed, 7 insertions, 9 deletions
diff --git a/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java b/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java
index 6d87012b2c..1abc92b064 100644
--- a/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java
+++ b/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java
@@ -701,8 +701,8 @@ public class TestEvaluationCache extends TestCase {
}
private static void debugPrint(PrintStream ps, String[] log) {
- for (int i = 0; i < log.length; i++) {
- ps.println('"' + log[i] + "\",");
+ for (String element : log) {
+ ps.println('"' + element + "\",");
}
}
diff --git a/src/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java b/src/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java
index aada5e7240..2dab84ca7e 100644
--- a/src/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java
+++ b/src/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java
@@ -219,8 +219,8 @@ public final class ExcelFileFormatDocFunctionExtractor {
Arrays.sort(keys);
_ps.println("# " + headingText);
- for (int i = 0; i < keys.length; i++) {
- FunctionData fd = _allFunctionsByIndex.get(keys[i]);
+ for (Integer key : keys) {
+ FunctionData fd = _allFunctionsByIndex.get(key);
_ps.println(fd.formatAsDataLine());
}
}
@@ -554,9 +554,9 @@ public final class ExcelFileFormatDocFunctionExtractor {
"See the License for the specific language governing permissions and",
"limitations under the License.",
};
- for (int i = 0; i < lines.length; i++) {
+ for (String line : lines) {
ps.print("# ");
- ps.println(lines[i]);
+ ps.println(line);
}
ps.println();
}
diff --git a/src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java b/src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java
index 8cf4d6aafd..559dd8c72c 100644
--- a/src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java
+++ b/src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java
@@ -129,9 +129,7 @@ public final class TestAreaPtg extends TestCase {
int letUsShiftColumn1By1Column=1;
HSSFWorkbook wb = null;
Ptg[] ptgs = HSSFFormulaParser.parse(formula, wb);
- for(int i=0; i<ptgs.length; i++)
- {
- Ptg ptg = ptgs[i];
+ for (Ptg ptg : ptgs) {
if (ptg instanceof AreaPtg )
{
AreaPtg aptg = (AreaPtg)ptg;