From ae0bc343c3c22944e366bababf2fafa3fc5f2b41 Mon Sep 17 00:00:00 2001 From: Manuel Soulier Date: Thu, 16 Nov 2023 16:52:08 +0100 Subject: [PATCH] fix: trim parsed csv columns and expressions --- .../p2chargement/operation/ParseFormatRulesOperation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arc-core/src/main/java/fr/insee/arc/core/service/p2chargement/operation/ParseFormatRulesOperation.java b/arc-core/src/main/java/fr/insee/arc/core/service/p2chargement/operation/ParseFormatRulesOperation.java index fcb415a24..40482b315 100644 --- a/arc-core/src/main/java/fr/insee/arc/core/service/p2chargement/operation/ParseFormatRulesOperation.java +++ b/arc-core/src/main/java/fr/insee/arc/core/service/p2chargement/operation/ParseFormatRulesOperation.java @@ -104,7 +104,7 @@ private String parse(T criteria, String inputString) { if (criteria.getAfterTag() == null) { if (inputString.contains(criteria.getBeforeTag())) { - return ManipString.substringBeforeFirst(inputString, criteria.getBeforeTag()); + return ManipString.substringBeforeFirst(inputString, criteria.getBeforeTag()).trim(); } else { return null; } @@ -115,7 +115,7 @@ private String parse(T criteria, String inputString) { return ManipString.substringBeforeFirst( ManipString.substringAfterFirst(inputString, criteria.getAfterTag()), criteria.getBeforeTag()); } else { - return ManipString.substringAfterFirst(inputString, criteria.getAfterTag()); + return ManipString.substringAfterFirst(inputString, criteria.getAfterTag()).trim(); } }