style: format code with spotless
All checks were successful
Build, test and publish the Quarkus libraries / build (push) Successful in 1m22s
All checks were successful
Build, test and publish the Quarkus libraries / build (push) Successful in 1m22s
This commit is contained in:
parent
e5e100076c
commit
40598dbe87
17 changed files with 88 additions and 155 deletions
|
@ -9,5 +9,4 @@ public interface JsonService {
|
|||
<T> T fromJson(String json, Class<T> clazz);
|
||||
|
||||
<T> T fromJson(String json, TypeReference<T> typeReference);
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue