From 27bc607b1cf2d4b44d9deb485df375a2c17300a5 Mon Sep 17 00:00:00 2001 From: elroy Date: Fri, 21 Jul 2017 06:46:53 +0200 Subject: [PATCH] Trim whitespaces between orders --- .../java/nl/komtek/gpi/controllers/GunbotProxyController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/nl/komtek/gpi/controllers/GunbotProxyController.java b/src/main/java/nl/komtek/gpi/controllers/GunbotProxyController.java index e3c2469..1306278 100644 --- a/src/main/java/nl/komtek/gpi/controllers/GunbotProxyController.java +++ b/src/main/java/nl/komtek/gpi/controllers/GunbotProxyController.java @@ -14,6 +14,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; @@ -240,7 +241,7 @@ public class GunbotProxyController { JsonElement element = it.next(); JsonObject jsonObject = element.getAsJsonObject(); String orderNumber = jsonObject.get("orderNumber").getAsString(); - String[] orderNumbersToHide = util.getConfigurationProperty("hideOrders","").split(","); + String[] orderNumbersToHide = StringUtils.trimAllWhitespace(util.getConfigurationProperty("hideOrders","")).split(","); if (Arrays.asList(orderNumbersToHide).contains(orderNumber)){ it.remove(); }