aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2017-10-18 08:22:51 +0000
committerJaven O'Neal <onealj@apache.org>2017-10-18 08:22:51 +0000
commit59277965a2232a35fd984951ea13d6aa2b32d3c9 (patch)
treef7ec78f2e8023feea61de7c8212b5b98562a8a70 /src
parent8300528aada54923365f5fa085ad37698f380972 (diff)
downloadpoi-59277965a2232a35fd984951ea13d6aa2b32d3c9.tar.gz
poi-59277965a2232a35fd984951ea13d6aa2b32d3c9.zip
convert "".equals(string) to string.isEmpty()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812470 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java2
-rw-r--r--src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java2
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java2
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java2
4 files changed, 4 insertions, 4 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 d266b7475e..34842a5bd3 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 = "&nbsp;";
}
}
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 e2f4825274..70b3cd4c2b 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 724a432657..88b52493ea 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 535094ff05..8ceec105e2 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());
}