diff options
author | Dominik Stadler <centic@apache.org> | 2024-07-15 13:03:19 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2024-07-15 13:03:19 +0000 |
commit | a3d9c025e9d165e3ab903b0bdcb0f7df6a4321d8 (patch) | |
tree | f22e0309d07c5bbc472a965af8c5b927a4aa929a /poi | |
parent | 2582e5e0c18026c88b882829254241a9acc6f45f (diff) | |
download | poi-a3d9c025e9d165e3ab903b0bdcb0f7df6a4321d8.tar.gz poi-a3d9c025e9d165e3ab903b0bdcb0f7df6a4321d8.zip |
Apply some IDE suggestions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919257 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r-- | poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java index 1a410e6f12..3b5a1e24f0 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java @@ -405,7 +405,7 @@ public abstract class BaseTestBugzillaIssues { // assertTrue("Had zero length starting at length " + i, computeCellWidthFixed(font, b.toString()) > 0); // } double widthManual = computeCellWidthManually(cell0, font); - double widthBeforeCell = SheetUtil.getCellWidth(cell0, 8, null, false); + double widthBeforeCell = SheetUtil.getCellWidth(cell0, 8.0f, null, false); double widthBeforeCol = SheetUtil.getColumnWidth(sheet, 0, false); String info = widthManual + "/" + widthBeforeCell + "/" + widthBeforeCol + "/" + @@ -419,7 +419,7 @@ public abstract class BaseTestBugzillaIssues { double width = SheetUtil.getColumnWidth(sheet, 0, false); assertTrue(width > 0, "Expected to have column width > 0 AFTER auto-size, but had " + width); - width = SheetUtil.getCellWidth(cell0, 8, null, false); + width = SheetUtil.getCellWidth(cell0, 8.0f, null, false); assertTrue(width > 0, "Expected to have cell width > 0 AFTER auto-size, but had " + width); assertEquals(255 * 256, sheet.getColumnWidth(0)); // maximum column width is 255 characters @@ -1156,7 +1156,7 @@ public abstract class BaseTestBugzillaIssues { // verify that null-values can be set, this was possible up to 3.11, but broken in 3.12 cell.setCellValue((String) null); String value = cell.getStringCellValue(); - assertTrue(value == null || value.length() == 0, + assertTrue(value == null || value.isEmpty(), "HSSF will currently return empty string, XSSF/SXSSF will return null, but had: " + value); cell = row.createCell(1); @@ -1166,7 +1166,7 @@ public abstract class BaseTestBugzillaIssues { wb.getCreationHelper().createFormulaEvaluator().evaluateAll(); value = cell.getStringCellValue(); - assertTrue(value == null || value.length() == 0, + assertTrue(value == null || value.isEmpty(), "HSSF will currently return empty string, XSSF/SXSSF will return null, but had: " + value); // set some value @@ -1178,7 +1178,7 @@ public abstract class BaseTestBugzillaIssues { // verify that the null-value is actually set even if there was some value in the cell before cell.setCellValue((String) null); value = cell.getStringCellValue(); - assertTrue(value == null || value.length() == 0, + assertTrue(value == null || value.isEmpty(), "HSSF will currently return empty string, XSSF/SXSSF will return null, but had: " + value); } } |