From 5846a378b8ea04dc4a1174bd45b49440fc27176a Mon Sep 17 00:00:00 2001 From: "CITE\\amentis" Date: Thu, 26 Sep 2024 17:06:29 +0300 Subject: [PATCH] small fixes --- .../service/wordfiletransformer/word/WordBuilderImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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);