This is an automated email from the ASF dual-hosted git repository.

pjfanning pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d4302d409b Update XWPFTable.java
d4302d409b is described below

commit d4302d409bfe78f626ae2e6d4f390d3927572e1f
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Jul 28 17:41:10 2026 +0100

    Update XWPFTable.java
---
 poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java 
b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
index ffebcdacfc..273635e022 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
@@ -176,13 +176,13 @@ public class XWPFTable implements IBodyElement, 
ISDTContents {
             for (CTTc cell : row.getTcList()) {
                 for (CTP ctp : cell.getPList()) {
                     XWPFParagraph p = new XWPFParagraph(ctp, part);
-                    if (rowText.length() > 0) {
+                    if (!rowText.isEmpty()) {
                         rowText.append('\t');
                     }
                     rowText.append(p.getText());
                 }
             }
-            if (rowText.length() > 0) {
+            if (!rowText.isEmpty()) {
                 this.text.append(rowText);
                 this.text.append('\n');
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to