diff --git a/grobid-core/src/main/java/org/grobid/core/document/TEIFormatter.java b/grobid-core/src/main/java/org/grobid/core/document/TEIFormatter.java index d9f2c46006..8f9c12aad1 100755 --- a/grobid-core/src/main/java/org/grobid/core/document/TEIFormatter.java +++ b/grobid-core/src/main/java/org/grobid/core/document/TEIFormatter.java @@ -923,8 +923,8 @@ else if (biblio.getE_Year().length() == 4) tei.append("\t\t\t\n"); } - if ((abstractText != null) && (abstractText.length() != 0)) { - if ( (biblio.getLabeledAbstract() != null) && (biblio.getLabeledAbstract().length() > 0) ) { + if (StringUtils.isNotBlank(abstractText)) { + if (StringUtils.isNotBlank(biblio.getLabeledAbstract())) { // we have available structured abstract, which can be serialized as a full text "piece" StringBuilder buffer = new StringBuilder(); try {