You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2017/10/18 08:22:51 UTC

svn commit: r1812470 - in /poi/trunk/src: examples/src/org/apache/poi/ss/examples/html/ ooxml/testcases/org/apache/poi/poifs/crypt/ testcases/org/apache/poi/ss/formula/functions/ testcases/org/apache/poi/ss/usermodel/

Author: onealj
Date: Wed Oct 18 08:22:51 2017
New Revision: 1812470

URL: http://svn.apache.org/viewvc?rev=1812470&view=rev
Log:
convert "".equals(string) to string.isEmpty()

Modified:
    poi/trunk/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java

Modified: poi/trunk/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java?rev=1812470&r1=1812469&r2=1812470&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java Wed Oct 18 08:22:51 2017
@@ -479,7 +479,7 @@ public class ToHtml {
                                 style.getDataFormatString());
                         CellFormatResult result = cf.apply(cell);
                         content = result.text;
-                        if ("".equals(content)) {
+                        if (content.isEmpty()) {
                             content = " ";
                         }
                     }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java?rev=1812470&r1=1812469&r2=1812470&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java Wed Oct 18 08:22:51 2017
@@ -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";
         }
 

Modified: poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java?rev=1812470&r1=1812469&r2=1812470&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java Wed Oct 18 08:22:51 2017
@@ -127,7 +127,7 @@ public abstract class BaseTestFunctionsF
             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();
             }
             

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java?rev=1812470&r1=1812469&r2=1812470&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java Wed Oct 18 08:22:51 2017
@@ -170,7 +170,7 @@ public abstract class BaseTestCellCommen
 
             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());
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org