From 24a08cfac09b8160d23a2de56b5cc533d5c0f430 Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Fri, 8 Dec 2023 17:51:30 +0100 Subject: [PATCH] LabelFact: Use strip() to handle non-ASCII whitespace --- .../java/eu/europa/ted/eforms/sdk/analysis/fact/LabelFact.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/LabelFact.java b/src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/LabelFact.java index a4dad77..c97e1a1 100644 --- a/src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/LabelFact.java +++ b/src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/LabelFact.java @@ -18,7 +18,7 @@ public String getId() { public String getNormalizedId() { String id = label.getId(); - return id.trim().toLowerCase().replaceAll("[-_\\.]", ""); + return id.strip().toLowerCase().replaceAll("[-_\\.]", ""); } @Override