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 d266b7475..34842a5bd 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 @@ -479,7 +479,7 @@ public class ToHtml { style.getDataFormatString()); CellFormatResult result = cf.apply(cell); content = result.text; - if ("".equals(content)) { + if (content.isEmpty()) { content = " "; } } diff --git a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java index e2f482527..70b3cd4c2 100644 --- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java +++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java @@ -798,7 +798,7 @@ public class TestSignatureInfo { private static File copy(File input) throws IOException { String extension = input.getName().replaceAll(".*?(\\.[^.]+)?$", "$1"); - if (extension == null || "".equals(extension)) { + if (extension == null || extension.isEmpty()) { extension = ".zip"; } diff --git a/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java b/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java index 724a43265..88b52493e 100644 --- a/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java +++ b/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java @@ -127,7 +127,7 @@ public abstract class BaseTestFunctionsFromSpreadsheet { String rowComment = getCellTextValue(r, SS.COLUMN_ROW_COMMENT, "row comment"); String testName = (currentGroupComment+'\n'+rowComment).replace("null", "").trim().replace("\n", " - "); - if ("".equals(testName)) { + if (testName.isEmpty()) { testName = evalCell.getCellFormula(); } diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java index 535094ff0..8ceec105e 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java @@ -170,7 +170,7 @@ public abstract class BaseTestCellComment { assertEquals("Yegor Kozlov", comment.getAuthor()); assertFalse("cells in the second column have not empyy notes", - "".equals(comment.getString().getString())); + comment.getString().getString().isEmpty()); assertEquals(rownum, comment.getRow()); assertEquals(cell.getColumnIndex(), comment.getColumn()); }