Skip to content

Commit

Permalink
Minor improvement to exception messages for type id resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 5, 2019
1 parent 0e644b8 commit 5f1bb5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ public JsonMappingException instantiationException(Class<?> instClass, String ms
public JsonMappingException invalidTypeIdException(JavaType baseType, String typeId,
String extraDesc) {
String msg = String.format("Could not resolve type id '%s' as a subtype of %s",
typeId, baseType);
typeId, ClassUtil.getTypeDescription(baseType));
return InvalidTypeIdException.from(_parser, _colonConcat(msg, extraDesc), baseType, typeId);
}

Expand Down Expand Up @@ -1784,7 +1784,7 @@ public JsonMappingException unknownTypeException(JavaType type, String id,
String extraDesc)
{
String msg = String.format("Could not resolve type id '%s' into a subtype of %s",
id, type);
id, ClassUtil.getTypeDescription(type));
msg = _colonConcat(msg, extraDesc);
return MismatchedInputException.from(_parser, type, msg);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ public void reportMappingProblem(Throwable t, String message, Object... msgArgs)
public JsonMappingException invalidTypeIdException(JavaType baseType, String typeId,
String extraDesc) {
String msg = String.format("Could not resolve type id '%s' as a subtype of %s",
typeId, baseType);
typeId, ClassUtil.getTypeDescription(baseType));
return InvalidTypeIdException.from(null, _colonConcat(msg, extraDesc), baseType, typeId);
}

Expand Down

0 comments on commit 5f1bb5a

Please sign in to comment.