cleanup for r1812470: avoid NPEs from string.isEmpty()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812532 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
49add35f3b
commit
22e4bc2399
@ -478,7 +478,7 @@ public class ToHtml {
|
||||
CellFormat cf = CellFormat.getInstance(
|
||||
style.getDataFormatString());
|
||||
CellFormatResult result = cf.apply(cell);
|
||||
content = result.text;
|
||||
content = result.text; //never null
|
||||
if (content.isEmpty()) {
|
||||
content = " ";
|
||||
}
|
||||
|
@ -169,8 +169,8 @@ public abstract class BaseTestCellComment {
|
||||
assertNotNull("Cells in the second column have comments", sheet.getCellComment(new CellAddress(rownum, 1)));
|
||||
|
||||
assertEquals("Yegor Kozlov", comment.getAuthor());
|
||||
assertFalse("cells in the second column have not empyy notes",
|
||||
comment.getString().getString().isEmpty());
|
||||
assertTrue("cells in the second column should have non-empty notes",
|
||||
!comment.getString().getString().isEmpty());
|
||||
assertEquals(rownum, comment.getRow());
|
||||
assertEquals(cell.getColumnIndex(), comment.getColumn());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user