Przeglądaj źródła

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
tags/REL_4_0_0_FINAL
Javen O'Neal 6 lat temu
rodzic
commit
2a0aac8ea5

+ 1
- 1
src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java Wyświetl plik

@@ -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 = " ";
}

+ 2
- 2
src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java Wyświetl plik

@@ -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());
}

Ładowanie…
Anuluj
Zapisz