fix space before comma if there is a firm

This commit is contained in:
Timotheus Pokorra 2024-10-05 23:38:01 +02:00 committed by Dev und Test fuer hsadminng
parent be4c98f608
commit 792ef1d87f

View File

@ -1190,13 +1190,13 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
final String firm) { final String firm) {
final var result = new StringBuilder(); final var result = new StringBuilder();
if (isNotBlank(salut)) if (isNotBlank(salut))
result.append(salut + " "); result.append((isBlank(result) ? "" : " ") + salut);
if (isNotBlank(title)) if (isNotBlank(title))
result.append(title + " "); result.append((isBlank(result) ? "" : " ") + title);
if (isNotBlank(firstname)) if (isNotBlank(firstname))
result.append(firstname + " "); result.append((isBlank(result) ? "" : " ") + firstname);
if (isNotBlank(lastname)) if (isNotBlank(lastname))
result.append(lastname + " "); result.append((isBlank(result) ? "" : " ") + lastname);
if (isNotBlank(firm)) { if (isNotBlank(firm)) {
result.append((isBlank(result) ? "" : ", ") + firm); result.append((isBlank(result) ? "" : ", ") + firm);
} }