Skip to content

Commit

Permalink
handle null tsp source in user settings
Browse files Browse the repository at this point in the history
  • Loading branch information
celuchmarek committed Jul 1, 2024
1 parent 288de83 commit ef90d0a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/digital/slovensko/autogram/core/UserSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, TSPSource>();
Expand Down

0 comments on commit ef90d0a

Please sign in to comment.