use isEmpty

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2025-04-10 19:02:59 +00:00
parent 92d4a8d86d
commit 993cc5a5b8

View File

@ -112,7 +112,7 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
NodeList kids = t.getDomNode().getChildNodes();
for (int n = 0; n < kids.getLength(); n++) {
if (kids.item(n) instanceof Text) {
if (!text.isEmpty()) {
if (text.length() > 0) {
text.append("\n");
}
text.append(kids.item(n).getNodeValue());