From c0ffeef8a2c3fce642a827dd79820bc947a45b7a Mon Sep 17 00:00:00 2001 From: Thomas Richner Date: Fri, 18 Oct 2024 11:17:49 +0200 Subject: [PATCH] EPA-158: Improve coverage --- .../util/ExtendedJWKSetDeserializer.java | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/ehealthid/src/main/java/com/oviva/ehealthid/util/ExtendedJWKSetDeserializer.java b/ehealthid/src/main/java/com/oviva/ehealthid/util/ExtendedJWKSetDeserializer.java index 5899905..de4635c 100644 --- a/ehealthid/src/main/java/com/oviva/ehealthid/util/ExtendedJWKSetDeserializer.java +++ b/ehealthid/src/main/java/com/oviva/ehealthid/util/ExtendedJWKSetDeserializer.java @@ -1,6 +1,5 @@ package com.oviva.ehealthid.util; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.TreeNode; import com.fasterxml.jackson.core.type.TypeReference; @@ -9,9 +8,7 @@ import com.nimbusds.jose.jwk.JWK; import com.oviva.ehealthid.fedclient.api.ExtendedJWKSet; import java.io.IOException; -import java.text.ParseException; import java.util.List; -import java.util.Map; public class ExtendedJWKSetDeserializer extends StdDeserializer { @@ -52,24 +49,4 @@ private long parseLongField(JsonParser jsonParser, TreeNode node, String fieldNa .getCodec() .readValue(node.get(fieldName).traverse(jsonParser.getCodec()), Long.class); } - - public static class JWKDeserializer extends StdDeserializer { - - public JWKDeserializer(Class vc) { - super(vc); - } - - @Override - public JWK deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) - throws IOException { - - Map map = - jsonParser.getCodec().readValue(jsonParser, new TypeReference>() {}); - try { - return JWK.parse(map); - } catch (ParseException e) { - throw new JsonParseException(jsonParser, "failed to parse JWK", e); - } - } - } }