style: format code with spotless
All checks were successful
Build, test and publish the Quarkus libraries / build (push) Successful in 1m22s

This commit is contained in:
Jorge Bornhausen 2024-11-11 09:29:02 +01:00
parent e5e100076c
commit 40598dbe87
Signed by: jorge.bornhausen
SSH key fingerprint: SHA256:X2ootOwvCeP4FoNfmVUFIKIbhq95tAgnt7Oqg3x+lfs
17 changed files with 88 additions and 155 deletions

View file

@ -9,5 +9,4 @@ public interface JsonService {
<T> T fromJson(String json, Class<T> clazz);
<T> T fromJson(String json, TypeReference<T> typeReference);
}

View file

@ -30,10 +30,9 @@ class JsonServiceImpl implements JsonService {
try {
return objectMapper.readValue(json, clazz);
} catch (JsonProcessingException e) {
throw new IllegalArgumentException("Unable to read object of class [" + clazz.getName()
+ "] from json String: " + json, e);
throw new IllegalArgumentException(
"Unable to read object of class [" + clazz.getName() + "] from json String: " + json, e);
}
}
@Override
@ -41,8 +40,10 @@ class JsonServiceImpl implements JsonService {
try {
return objectMapper.readValue(json, typeReference);
} catch (JsonProcessingException e) {
throw new IllegalArgumentException("Unable to read object of type [" + typeReference.getType().getTypeName()
+ "] from json String: " + json, e);
throw new IllegalArgumentException(
"Unable to read object of type [" + typeReference.getType().getTypeName() + "] from json String: "
+ json,
e);
}
}
}