diff options
author | Dominik Stadler <centic@apache.org> | 2015-09-03 20:59:14 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2015-09-03 20:59:14 +0000 |
commit | 7da84c99f2eb406119eb0d63daa41be62d8faa67 (patch) | |
tree | 5652e03be4bbd71f1caa7a80dc3728c58b1cfbda /src/testcases/org/apache/poi/hssf/usermodel | |
parent | 357db35bc2b20d5daed03dad528615897b471f52 (diff) | |
download | poi-7da84c99f2eb406119eb0d63daa41be62d8faa67.tar.gz poi-7da84c99f2eb406119eb0d63daa41be62d8faa67.zip |
Eclipse warnings, close resources in CommandLineTextExtractor, add try/finally, formatting, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701139 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/usermodel')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java index 8ef9a41be5..f1aad88c1f 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java @@ -228,6 +228,7 @@ public final class TestHSSFDataFormatter extends TestCase { row = wb.getSheetAt(0).getRow(1); it = row.cellIterator(); log("==== VALID TIME FORMATS ===="); + while (it.hasNext()) { Cell cell = it.next(); String fmt = cell.getCellStyle().getDataFormatString(); @@ -239,7 +240,8 @@ public final class TestHSSFDataFormatter extends TestCase { assertTrue( ! "555.47431".equals(fmtval)); // check we found the time properly - assertTrue("Format came out incorrect - " + fmt, fmtval.indexOf("11:23") > -1); + assertTrue("Format came out incorrect - " + fmt + ": " + fmtval + ", but expected to find '11:23'", + fmtval.indexOf("11:23") > -1); } // test number formats @@ -409,8 +411,8 @@ public final class TestHSSFDataFormatter extends TestCase { } private static void log(String msg) { - if (false) { // successful tests should be silent - System.out.println(msg); - } +// if (false) { // successful tests should be silent +// System.out.println(msg); +// } } } |