From 792ef1d87f40cdcdef5bbfb88c337545fb03ec38 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sat, 5 Oct 2024 23:38:01 +0200 Subject: [PATCH] fix space before comma if there is a firm --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index c60645ba..5fee84df 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -1190,13 +1190,13 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { final String firm) { final var result = new StringBuilder(); if (isNotBlank(salut)) - result.append(salut + " "); + result.append((isBlank(result) ? "" : " ") + salut); if (isNotBlank(title)) - result.append(title + " "); + result.append((isBlank(result) ? "" : " ") + title); if (isNotBlank(firstname)) - result.append(firstname + " "); + result.append((isBlank(result) ? "" : " ") + firstname); if (isNotBlank(lastname)) - result.append(lastname + " "); + result.append((isBlank(result) ? "" : " ") + lastname); if (isNotBlank(firm)) { result.append((isBlank(result) ? "" : ", ") + firm); }