diff --git a/core/src/main/java/org/opencdmp/filetransformer/docx/service/wordfiletransformer/word/WordBuilderImpl.java b/core/src/main/java/org/opencdmp/filetransformer/docx/service/wordfiletransformer/word/WordBuilderImpl.java index d7112ab..acb1f6d 100644 --- a/core/src/main/java/org/opencdmp/filetransformer/docx/service/wordfiletransformer/word/WordBuilderImpl.java +++ b/core/src/main/java/org/opencdmp/filetransformer/docx/service/wordfiletransformer/word/WordBuilderImpl.java @@ -673,8 +673,7 @@ public class WordBuilderImpl implements WordBuilder { String label = ""; if (referenceModel.getLabel() != null && !referenceModel.getLabel().isBlank()) { label = referenceModel.getLabel(); - } - if (referenceModel.getDescription() != null && !referenceModel.getDescription().isBlank()) { + } else if (referenceModel.getDescription() != null && !referenceModel.getDescription().isBlank()) { label = (label.isBlank() ? "" : " ") + referenceModel.getDescription(); } ReferenceFieldModel fieldModel = referenceModel.getDefinition() != null && referenceModel.getDefinition().getFields() != null && !referenceModel.getDefinition().getFields().isEmpty() ? referenceModel.getDefinition().getFields().stream().filter(x -> x.getCode().equals("pidTypeField")).findFirst().orElse(null) : null; @@ -810,8 +809,7 @@ public class WordBuilderImpl implements WordBuilder { String label = ""; if (referenceModel.getLabel() != null && !referenceModel.getLabel().isBlank()) { label = referenceModel.getLabel(); - } - if (referenceModel.getDescription() != null && !referenceModel.getDescription().isBlank()) { + } else if (referenceModel.getDescription() != null && !referenceModel.getDescription().isBlank()) { label = (label.isBlank() ? "" : " ") + referenceModel.getDescription(); } if (!label.isBlank()) values.add(label);