diff options
author | Thomas <> | 2022-08-18 08:55:25 +0200 |
---|---|---|
committer | Thomas <> | 2022-08-18 08:55:25 +0200 |
commit | 5efc2e4f31e3456e68ac19fe21352ac501302bf4 (patch) | |
tree | 66c1ac717d3763647cfb7623d68109be56b06edb /eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/SL20HttpBindingUtils.java | |
parent | d0309843cf6775c215bb132283116b6442b082d6 (diff) | |
download | EAAF-Components-5efc2e4f31e3456e68ac19fe21352ac501302bf4.tar.gz EAAF-Components-5efc2e4f31e3456e68ac19fe21352ac501302bf4.tar.bz2 EAAF-Components-5efc2e4f31e3456e68ac19fe21352ac501302bf4.zip |
refact(sl20): switch to one single JSONMapper instsance
Diffstat (limited to 'eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/SL20HttpBindingUtils.java')
-rw-r--r-- | eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/SL20HttpBindingUtils.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/SL20HttpBindingUtils.java b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/SL20HttpBindingUtils.java index 2b6ddb96..96fd34e8 100644 --- a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/SL20HttpBindingUtils.java +++ b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/SL20HttpBindingUtils.java @@ -33,7 +33,6 @@ import lombok.Getter; public class SL20HttpBindingUtils { private static final Logger log = LoggerFactory.getLogger(SL20HttpBindingUtils.class); - private static JsonMapper mapper = new JsonMapper(); @Data @Getter @@ -81,7 +80,7 @@ public class SL20HttpBindingUtils { } final String sl20RespString = new URIBuilder(locationHeader[0].getValue()).getQueryParams().get(0).getValue(); - return new Sl20ResponseHolder(mapper.getMapper().readTree(Base64Url.decode(sl20RespString)), + return new Sl20ResponseHolder(JsonMapper.getMapper().readTree(Base64Url.decode(sl20RespString)), response.getStatusLine()); } else if ( @@ -96,7 +95,7 @@ public class SL20HttpBindingUtils { bodyMsg = EntityUtils.toString(response.getEntity()); log.info("SL20 response with http-code: {0} and errorMsg: {1}", httpStatusCode, bodyMsg); Sl20ResponseHolder holder = new Sl20ResponseHolder( - mapper.getMapper().readTree(bodyMsg), response.getStatusLine()); + JsonMapper.getMapper().readTree(bodyMsg), response.getStatusLine()); return holder; } catch (final IOException | ParseException e) { @@ -175,7 +174,7 @@ public class SL20HttpBindingUtils { if (resp != null && resp.getContent() != null) { final String rawSL20Resp = EntityUtils.toString(resp); try { - final JsonNode sl20Resp = mapper.getMapper().readTree(rawSL20Resp); + final JsonNode sl20Resp = JsonMapper.getMapper().readTree(rawSL20Resp); if (sl20Resp != null) { return sl20Resp; |