summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java2
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java b/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
index 34842a5bd3..d66ef83397 100644
--- a/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
+++ b/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
@@ -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 = " ";
}
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java
index 8ceec105e2..f19f1ac562 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java
@@ -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());
}