From 7da84c99f2eb406119eb0d63daa41be62d8faa67 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Thu, 3 Sep 2015 20:59:14 +0000 Subject: 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 --- .../org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/testcases/org/apache/poi/hssf/usermodel') 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); +// } } } -- cgit v1.2.3