From ef90d0a5a13fc25a833570a86a058b79121bc02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ce=C4=BEuch?= Date: Mon, 1 Jul 2024 15:50:43 +0200 Subject: [PATCH] handle null tsp source in user settings --- .../digital/slovensko/autogram/core/UserSettings.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/digital/slovensko/autogram/core/UserSettings.java b/src/main/java/digital/slovensko/autogram/core/UserSettings.java index cd956aab..bf3e6703 100644 --- a/src/main/java/digital/slovensko/autogram/core/UserSettings.java +++ b/src/main/java/digital/slovensko/autogram/core/UserSettings.java @@ -208,16 +208,16 @@ public String getTsaServer() { } public void setTsaServer(String value) { - // set default TSA if older problematic default is set - if (List.of("http://tsa.izenpe.com", "http://kstamp.keynectis.com/KSign/").contains(value)) - value = "http://tsa.belgium.be/connect,http://ts.quovadisglobal.com/eu,http://tsa.sep.bg"; - - tsaServer = value; if (value == null) { tspSource = null; return; } + // set default TSA if older problematic default is set + if (List.of("http://tsa.izenpe.com", "http://kstamp.keynectis.com/KSign/").contains(value)) + value = "http://tsa.belgium.be/connect,http://ts.quovadisglobal.com/eu,http://tsa.sep.bg"; + + tsaServer = value; tspSource = new CompositeTSPSource(); var timestampDataLoader = new TimestampDataLoader(); var tspSources = new HashMap();